如何解决为什么我的 pip install 没有安装 netifaces
我正在使用 python 3.8.6,但由于某种原因它无法为 netifaces 构建轮子
错误:
C:\Users\cuerv>pip install --upgrade netifaces
收集网面
使用缓存的 netifaces-0.10.9.tar.gz (28 kB)
为收集的包构建轮子:netifaces
为 netifaces 构建轮子 (setup.py) ... 错误
错误:命令出错,退出状态为 1:
命令:'c:\users\cuerv\downloads\my code\imports\python 3.8.6\python.exe' -u -c 'import sys,setuptools,tokenize; sys.argv[0] = '"'"'C:\Users\cuerv\AppData\Local\Temp\pip-install-femvpx3w\netifaces_673ef3fc78424548962ff6e3f9ac8b17\setup.py'"'"'; file='"'"'C:\Users\cuerv\AppData\Local\Temp\pip-install-femvpx3w\netifaces_673ef3fc78424548962ff6e3f9ac8b17\setup.py'"'"';f=getattr(tokenize,'"'"'open'"'"',open)(file);code=f.read().replace('"'"'\r\n'"'"','"'"'\n'"'"');f.close();exec(compile(code,file,'"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\cuerv\AppData\Local\Temp\pip-wheel-qxm_uil5'
cwd:C:\Users\cuerv\AppData\Local\Temp\pip-install-femvpx3w\netifaces_673ef3fc78424548962ff6e3f9ac8b17
完整输出(5 行):
运行 bdist_wheel
运行构建
运行 build_ext
构建“netifaces”扩展
错误:需要 Microsoft Visual C++ 14.0。使用“Visual Studio 构建工具”获取它:https://visualstudio.microsoft.com/downloads/
错误:为 netifaces 构建轮子失败
为 netifaces 运行 setup.py clean
无法构建网络界面
安装收集的软件包:netifaces
为 netifaces 运行 setup.py install ... 错误
错误:命令出错,退出状态为 1:
命令:'c:\users\cuerv\downloads\my code\imports\python 3.8.6\python.exe' -u -c 'import sys,'"'"'exec'"'"'))' install --record 'C:\Users\cuerv\AppData\Local\Temp\pip-record-b4lmtpzg\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\用户\cuerv\downloads\我的代码\imports\python 3.8.6\Include\netifaces'
cwd:C:\Users\cuerv\AppData\Local\Temp\pip-install-femvpx3w\netifaces_673ef3fc78424548962ff6e3f9ac8b17
完整输出(5 行):
运行安装
运行构建
运行 build_ext
构建“netifaces”扩展
错误:需要 Microsoft Visual C++ 14.0。使用“Visual Studio 构建工具”获取它:https://visualstudio.microsoft.com/downloads/
---------------------------
错误:命令出错,退出状态为 1:'c:\users\cuerv\downloads\my code\imports\python 3.8.6\python.exe' -u -c 'import sys,'"'"'exec'"'"'))' install --record 'C:\Users\cuerv\AppData\Local\Temp\pip-record-b4lmtpzg\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\ users\cuerv\downloads\my code\imports\python 3.8.6\Include\netifaces' 检查日志以获取完整的命令输出。
解决方法
相关行是这样的:
Complete output (5 lines):
running install running build running build_ext building 'netifaces' extension error: Microsoft Visual C++ 14.0 is required.
Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
它告诉您要完成安装,您需要获取它提到的工具并安装它们。该软件包正在尝试在安装期间运行编译,它需要这些工具
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。