'io.h': No such file or directory

匿名 (未验证) 提交于 2019-12-03 08:46:08

问题:

I tried install netifaces in python 3.6.2 by:

pip install netifaces 

but when run it in cmd, I get error bellow:

c:\users\seyed_vahid\appdata\local\programs\python\python36\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe' failed with exit status 2 How fix it?

回答1:

I just had a frustrating day trying to find a way to make this work as well. (I use the Visual Studio, Python, Windows combination).

When getting build errors during pip installs (io.h, rc.exe not found etc), in my case with netifaces / pychromecast (but the issue is the same for all), make the following changes / additions to your environment variables:

INCLUDE (create if needed)

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK\SDK\include\ucrt;C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK\SDK\include\shared;C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK\SDK\include\um 

LIB (create if needed)

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK\SDK\lib 

Add to PATH

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\SDK\ScopeCppSDK\SDK\bin 

After making these changes I was able to install / compile things properly



回答2:

Try open VS Installer and install something like

VC++ 2015 v140 toolset



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!