1. 程式人生 > >fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

問題: 我在為python安裝skimage模組時出現編譯錯誤,如下,

skimage\external\tifffile\tifffile.c(75) : fatal error C1083: Cannot open include file: ‘stdint.h’: No such file or directory

原因: stdint.h是c99標準的標頭檔案,vc不支援,所以出現錯誤“No such file or directory”。

解決方法:
①去我的資源中下載msinttypes-r26.zip,地址為:http://download.csdn.net/detail/atfuies/10283186

解壓後得到3個檔案:inttypes.h,stdint.h,changelog.txt
②找到VC的include目錄,一般預設的VC for Python 的include位置為:
C:\Users\Administrator\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include
有的使用者名稱不是Administrator,將Administrator替換為你自己的使用者名稱。
③將inttypes.h和stdint.h兩個檔案放到VC for Python 的include檔案中。