報錯
使用pip安裝模塊,出現錯誤:
c:\\users\\anaconda3\\include\\pyconfig.h(68): fatal error C1083: 無法打開包括文件: “io.h”: No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Command "C:\\Users\\Anaconda3\\python.exe -u -c "import setuptools, tokenize; file ='C:\\Users\\AppData\\Local\\Temp\\pip-build-4u1qzu
cg\\lmdb\\setup.py';exec(compile(getattr(tokenize, 'open', open)( file ).read().replace('\\r\\n', '\\n'), file , 'exec'))" install --record C:
\\Users\\AppData\\Local\\Temp\\pip-bcivjbyw-record\\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in
C:\\Users\\AppData\\Local\\Temp\\pip-build-4u1qzucg\\lmdb\\
原因:無法找到io.h文件。
解決辦法
首先安裝Windows 10 SDK
SDK下載地址:https://developer.microsoft.com/zh-cn/windows/downloads/windows-10-sdk
默認安裝即可。
然后配置路徑:右鍵我的電腦——屬性——高級系統設置——環境變量——系統變量(s),在PATH中添加:
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\\\ucrt
即可解決該問題。
學習更多編程知識,請關注我的公眾號:
[代碼的路]
-
編程
+關注
關注
88文章
3679瀏覽量
94861 -
python
+關注
關注
56文章
4823瀏覽量
86157
發布評論請先 登錄
評論