報錯
使用pip安裝模(mo)塊,出現錯(cuo)誤:
c:\users\anaconda3\include\pyconfig.h(68): fatal error C1083: 無法打開包(bao)括(kuo)文件: “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\
原(yuan)因:無(wu)法(fa)找到io.h文件。
解決辦法
首先安裝Windows 10 SDK
SDK下載地址(zhi)://developer.microsoft.com/zh-cn/windows/downloads/windows-10-sdk
默認安裝即(ji)可(ke)。
然后配置路徑:右鍵我的電(dian)腦——屬性(xing)——高級系統設置——環境變(bian)量——系統變(bian)量(s),在PATH中添加:
C:\Program Files (x86)\Windows Kits\10\Include\<version>\ucrt
即可(ke)解(jie)決該問題。