无法安装来自pip的任何软件包;wheel构建失败。

huangapple go评论92阅读模式
英文:

Unable to install ANY package from pip; wheel failed to build

问题

每当我尝试从pip安装任何包(例如pip install --upgrade bottle-websocket),我总是得到相同的错误,无法构建wheel。我已经尝试升级setuptools、wheel和pip等所有东西,但仍然收到相同的错误。

  1. pip install --upgrade bottle-websocket
  2. 警告:由于无效的元数据条目'name',跳过/usr/local/lib/python3.11/dist-packages/pytube-12.1.3-py3.11.egg-info
  3. 正在收集 bottle-websocket
  4. 正在使用缓存的 bottle-websocket-0.2.9.tar.gz2.0 kB
  5. 准备元数据(setup.py)... 完成
  6. 正在收集 bottle(来自 bottle-websocket
  7. 正在使用缓存的 bottle-0.12.25-py3-none-any.whl90 kB
  8. 正在收集 gevent-websocket(来自 bottle-websocket
  9. 正在使用缓存的 gevent_websocket-0.10.1-py3-none-any.whl22 kB
  10. 要求已满足:gevent /usr/lib/python3/dist-packages 中(来自 gevent-websocket->bottle-websocket
  11. 正在构建 wheel 以收集的包:bottle-websocket
  12. 正在为 bottle-websocket 构建 wheelsetup.py)... 错误
  13. 错误:子进程以错误退出
  14. python setup.py bdist_wheel 未成功运行。
  15. 退出代码:1
  16. > [41 行输出]
  17. 正在运行 bdist_wheel
  18. 正在运行 build
  19. 正在运行 build_py
  20. 创建 build
  21. 创建 build/lib
  22. 创建 build/lib/bottle_websocket
  23. 复制 bottle_websocket/plugin.py -> build/lib/bottle_websocket
  24. 复制 bottle_websocket/server.py -> build/lib/bottle_websocket
  25. 复制 bottle_websocket/__init__.py -> build/lib/bottle_websocket
  26. /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  27. ********************************************************************************
  28. 请避免直接运行"setup.py"
  29. 而是使用pypa/buildpypa/installerpypa/build或其他符合标准的工具。
  30. 有关详细信息,请参阅https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html。
  31. ********************************************************************************
  32. self.initialize_options()
  33. 正在安装到 build/bdist.linux-aarch64/wheel
  34. 正在运行 install
  35. 正在运行 install_lib
  36. 创建 build/bdist.linux-aarch64
  37. 创建 build/bdist.linux-aarch64/wheel
  38. 创建 build/bdist.linux-aarch64/wheel/bottle_websocket
  39. 复制 build/lib/bottle_websocket/plugin.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
  40. 复制 build/lib/bottle_websocket/__init__.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
  41. 复制 build/lib/bottle_websocket/server.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
  42. 正在运行 install_egg_info
  43. 正在运行 egg_info
  44. 正在写入 bottle_websocket.egg-info/PKG-INFO
  45. 正在将依赖项链接写入 bottle_websocket.egg-info/dependency_links.txt
  46. 正在写入要求到 bottle_websocket.egg-info/requires.txt
  47. 正在写入顶级名称到 bottle_websocket.egg-info/top_level.txt
  48. 正在读取清单文件 'bottle_websocket.egg-info/SOURCES.txt'
  49. 正在写入清单文件 'bottle_websocket.egg-info/SOURCES.txt'
  50. 复制 bottle_websocket.egg-info build/bdist.linux-aarch64/wheel/bottle_websocket-0.2.9-py3.11.egg-info
  51. 错误:[Errno 13] 权限被拒绝:'build/bdist.linux-aarch64/wheel/bottle_websocket-0.2.9-py3.11.egg-info/dependency_links.txt'
  52. [输出结束]
  53. 注意:此错误源自子进程,可能与pip无关。
  54. 错误:无法为bottle-websocket构建wheel
  55. 运行 setup.py clean 以清理 bottle-websocket
  56. 无法为bottle-websocket构建wheel,这是安装基于pyproject.toml的项目所必需的错误。

这是错误信息。

英文:

Whenever I try to install any package from pip(pip install --upgrade bottle-websocketfor example)

I always get the same error, wheel fails to build, I have already tried to upgrade setuptools and wheel and pip, everything, but still I get the same error.

  1. pip install --upgrade bottle-websocket
  2. WARNING: Skipping /usr/local/lib/python3.11/dist-packages/pytube-12.1.3-py3.11.egg-info due to invalid metadata entry 'name'
  3. Collecting bottle-websocket
  4. Using cached bottle-websocket-0.2.9.tar.gz (2.0 kB)
  5. Preparing metadata (setup.py) ... done
  6. Collecting bottle (from bottle-websocket)
  7. Using cached bottle-0.12.25-py3-none-any.whl (90 kB)
  8. Collecting gevent-websocket (from bottle-websocket)
  9. Using cached gevent_websocket-0.10.1-py3-none-any.whl (22 kB)
  10. Requirement already satisfied: gevent in /usr/lib/python3/dist-packages (from gevent-websocket->bottle-websocket) (22.10.2)
  11. Building wheels for collected packages: bottle-websocket
  12. Building wheel for bottle-websocket (setup.py) ... error
  13. error: subprocess-exited-with-error
  14. python setup.py bdist_wheel did not run successfully.
  15. ? exit code: 1
  16. ??> [41 lines of output]
  17. running bdist_wheel
  18. running build
  19. running build_py
  20. creating build
  21. creating build/lib
  22. creating build/lib/bottle_websocket
  23. copying bottle_websocket/plugin.py -> build/lib/bottle_websocket
  24. copying bottle_websocket/server.py -> build/lib/bottle_websocket
  25. copying bottle_websocket/__init__.py -> build/lib/bottle_websocket
  26. /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
  27. !!
  28. ********************************************************************************
  29. Please avoid running ``setup.py`` directly.
  30. Instead, use pypa/build, pypa/installer, pypa/build or
  31. other standards-based tools.
  32. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
  33. ********************************************************************************
  34. !!
  35. self.initialize_options()
  36. installing to build/bdist.linux-aarch64/wheel
  37. running install
  38. running install_lib
  39. creating build/bdist.linux-aarch64
  40. creating build/bdist.linux-aarch64/wheel
  41. creating build/bdist.linux-aarch64/wheel/bottle_websocket
  42. copying build/lib/bottle_websocket/plugin.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
  43. copying build/lib/bottle_websocket/__init__.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
  44. copying build/lib/bottle_websocket/server.py -> build/bdist.linux-aarch64/wheel/bottle_websocket
  45. running install_egg_info
  46. running egg_info
  47. writing bottle_websocket.egg-info/PKG-INFO
  48. writing dependency_links to bottle_websocket.egg-info/dependency_links.txt
  49. writing requirements to bottle_websocket.egg-info/requires.txt
  50. writing top-level names to bottle_websocket.egg-info/top_level.txt
  51. reading manifest file 'bottle_websocket.egg-info/SOURCES.txt'
  52. writing manifest file 'bottle_websocket.egg-info/SOURCES.txt'
  53. Copying bottle_websocket.egg-info to build/bdist.linux-aarch64/wheel/bottle_websocket-0.2.9-py3.11.egg-info
  54. error: [Errno 13] Permission denied: 'build/bdist.linux-aarch64/wheel/bottle_websocket-0.2.9-py3.11.egg-info/dependency_links.txt'
  55. [end of output]
  56. note: This error originates from a subprocess, and is likely not a problem with pip.
  57. ERROR: Failed building wheel for bottle-websocket
  58. Running setup.py clean for bottle-websocket
  59. Failed to build bottle-websocket
  60. ERROR: Could not build wheels for bottle-websocket, which is required to install pyproject.toml-based projects

This is the error

答案1

得分: 0

我成功解决了问题,答案很简单,我必须以root权限执行它,我输入了sudo -i并输入了安装命令,它起作用了!

英文:

So I made it work out, the answer was simple, I had to do it with root privileges, I typed sudo -i and typed in the installation command and it worked!

答案2

得分: -1

尝试运行pip install cmake命令,并确保已安装和升级了wheel、setuptools和pip包。

如果这不起作用,请尝试使用pip3而不是pip,或者如果问题出现在pip上(可能没有正确安装),请尝试使用python -m,像这样:

python -m pip install cmake

python3 -m pip install cmake

英文:

Try to run the pip install cmake command and make sure you have the wheel, setuptools, and pip packages installed and upgraded.

If that doesn't work, try using pip3 instead of pip, or if it is a problem with pip (maybe it is not installed correctly), try using python -m, like this:

python -m pip install cmake
or
python3 -m pip install cmake

huangapple
  • 本文由 发表于 2023年5月11日 16:13:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76225461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定