[英]'io.h': No such file or directory during “pip install netifaces”
I tried to install netifaces in Python 3.6.2 by: 我尝试通过以下方式在Python 3.6.2中安装netifaces:
pip install netifaces
but when I run it in cmd, I get this error: 但是当我在cmd中运行它时,我收到此错误:
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
c:\\ users \\ seyed_vahid \\ appdata \\ local \\ programs \\ python \\ python36 \\ include \\ pyconfig.h(59):致命错误C1083:无法打开包含文件:'io.h':没有这样的文件或目录错误:command' C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC \\ bin \\ cl.exe'失败,退出状态为2
How can I fix it? 我该如何解决?
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).
(我使用Visual Studio,Python,Windows组合)。
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: 在pip安装期间遇到构建错误(io.h,rc.exe未找到等),在我的情况下使用netifaces / pychromecast(但问题对所有人来说都是一样的),对环境变量进行以下更改/添加:
INCLUDE (create if needed) INCLUDE(如果需要,创建)
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)
LIB(如果需要,创建)
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
进行这些更改后,我能够正确安装/编译
Try open VS Installer and install something like 尝试打开VS安装程序并安装类似的东西
VC++ 2015 v140 toolset
VC ++ 2015 v140工具集
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.