为了账号安全,请及时绑定邮箱和手机立即绑定

pip install 中“Failed building wheel for X”是什么意思?

pip install 中“Failed building wheel for X”是什么意思?

杨__羊羊 2021-08-11 17:11:52
这是 SO 上一个真正受欢迎的问题,但我看过的许多答案中没有一个能清楚地解释这个错误的真正含义以及它发生的原因。一个混乱的来源是,当(例如)你这样做时pip install pycparser,你首先得到错误:Failed building wheel for pycparser然后是消息包是:Successfully installed pycparser-2.19.# pip3 install pycparserCollecting pycparser  Using cached https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gzBuilding wheels for collected packages: pycparser  Running setup.py bdist_wheel for pycparser ... error  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-g_v28hpp/pycparser/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 /tmp/pip-wheel-__w_f6p0 --python-tag cp36:  Traceback (most recent call last):    File "<string>", line 1, in <module>    ...    File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2349, in resolve      module = __import__(self.module_name, fromlist=['__name__'], level=0)  ModuleNotFoundError: No module named 'wheel.bdist_wheel'  ----------------------------------------  Failed building wheel for pycparser  Running setup.py clean for pycparserFailed to build pycparserInstalling collected packages: pycparser  Running setup.py install for pycparser ... doneSuccessfully installed pycparser-2.19这里发生了什么?(我想了解某些东西是如何失败但仍然可以安装的,以及您是否可以相信这个包可以正常运行?)到目前为止,我发现的最好的部分解释是这个。
查看完整描述

3 回答

?
慕森卡

TA贡献1806条经验 获得超8个赞

因为,除了我自己,似乎没有人提到这一点。我自己解决上述问题是最常见的,以确保禁用缓存使用副本:pip install <package> --no-cache-dir


查看完整回答
反对 回复 2021-08-11
  • 3 回答
  • 0 关注
  • 578 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号