'io.h': no ​​such file or directory

I tried installing netifaces in python 3.6.2:

pip install netifaces 

but when run it in cmd, I will get the error below:

c: \ users \ seyed_vahid \ appdata \ local \ programs \ python \ python36 \ include \ pyconfig.h (59): fatal error C1083: unable to 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 to fix this?

+5
source share
1 answer

I just had a bad day trying to find a way to make this work. (I use a combination of Visual Studio, Python, Windows).

If you receive build errors during the installation of pip (io.h, rc.exe was not found, etc.), in my case with netifaces / pychromecast (but the problem is the same for everyone), make the following changes / additions to your environment variables:

ENABLE (create if necessary)

 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 necessary)

 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 properly install / compile things

0
source

Source: https://habr.com/ru/post/1271269/


All Articles