python安装neutron-lib报错,下载相应组件的.whl文件离线安装成功

项目场景:

使用pip安装neutron-lib,Build netifaces、Yappi 报错处理


问题描述:

使用pip安装neutron-lib,提示Build netifaces、Yappi 报错

ERROR: Failed building wheel for netifaces
  Running setup.py clean for netifaces
  Building wheel for Yappi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'e:\myproject\venv\scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\my\\AppData\\Local\\Temp\\pip-install-ldxeke3b\\yappi_11c85cddc3104269a9aad04b53cf39dd\\setup.py'"'
"'; __file__='"'"'C:\\Users\\my\\AppData\\Local\\Temp\\pip-install-ldxeke3b\\yappi_11c85cddc3104269a9aad04b53cf39dd\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO
('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\my\AppData\Local\Temp\pip-wheel-av4v53yb'
       cwd: C:\Users\my\AppData\Local\Temp\pip-install-ldxeke3b\yappi_11c85cddc3104269a9aad04b53cf39dd\
  Complete output (9 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.10
  copying yappi\yappi.py -> build\lib.win-amd64-3.10
  running build_ext
  building '_yappi' extension
  error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
  ----------------------------------------
  ERROR: Failed building wheel for Yappi
  Running setup.py clean for Yappi
Failed to build setproctitle netifaces Yappi
ERROR: Could not build wheels for setproctitle, which is required to install pyproject.toml-based projects

原因分析及解决办法:

发现报错是build netifaces、Yappi包的时候报错,访问网站:https://www.lfd.uci.edu/~gohlke/pythonlibs/,在界面 Ctrl+F 查找netifaces、Yappi,因为我装的是python3.9,系统是64位的,所以我选择下载如下图所示的whl文件

在这里插入图片描述
在这里插入图片描述
下载完以后找到对应的.whl文件,使用pip安装,安装命令如下所示:

pip install E:\Programs\netifaces-0.11.0-cp39-cp39-win_amd64.whl

在这里插入图片描述

pip install E:\Programs\yappi-1.3.3-cp39-cp39-win_amd64.whl

在这里插入图片描述
安装完以后,继续使用pip安装neutron-lib,成功安装(如果还是报错bulid xxx失败,就继续去网站https://www.lfd.uci.edu/~gohlke/pythonlibs/上搜相应的.whl文件,下载下来用pip安装,直到pip安装neutron-lib成功)
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值