I tried to install netifaces in Python 3.6.2 by:
pip install netifaces
but when I run it in cmd, I get this error:
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 can I fix it?
Try open VS Installer and install something like
VC++ 2015 v140 toolset
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With