错误:无法为 gevent 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

问题描述 投票:0回答:2

我使用的是python 3.9。 我尝试安装 python 包:

pip.exe install gdbgui==0.13.2.0

但是它给了我一个错误

ERROR: Failed building wheel for gevent
Failed to build gevent
ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects

我尝试从此链接下载 gevent https://www.lfd.uci.edu/~gohlke/pythonlibs/#gevent

然后我运行命令

pip.exe install gevent‑21.12.0‑cp39‑cp39‑win_amd64.whl

安装成功了,但是还是报错。

请问您知道如何解决这个问题吗?此错误:错误:无法为 gevent 构建轮子,这是安装基于 pyproject.toml 的项目所必需的

提前谢谢您。

python pip gevent
2个回答
7
投票

最后我通过将 python 降级到 3.8 解决了这个问题。 然后就成功了。

我希望它能帮助其他有同样情况的人。


0
投票

我有同样的问题,但是当尝试在 python3.9 上安装

gevent
时:

pip install gevent==24.2.1

我收到此错误:

#9 10.19   Building wheel for gevent (pyproject.toml): finished with status 'error'
#9 10.27   error: subprocess-exited-with-error
#9 10.27   
#9 10.27   × Building wheel for gevent (pyproject.toml) did not run successfully.
#9 10.27   │ exit code: 1
.... 
#9 10.27   note: This error originates from a subprocess, and is likely not a problem with pip.
#9 10.27   ERROR: Failed building wheel for gevent
#9 10.27 Failed to build gevent
#9 10.27 ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects

要在 Ubuntu 上解决此问题,就我而言,只需执行:

apt-get update && apt-get install -y --no-install-recommends build-essential
© www.soinside.com 2019 - 2024. All rights reserved.