gpt4 book ai didi

python - 错误 : command 'gcc' failed with exit status 1 while installing eventlet

转载 作者:IT老高 更新时间:2023-10-28 12:20:07 24 4
gpt4 key购买 nike

我想在我的系统上安装 eventlet 以便让“群”进行软件部署。但终端显示 gcc 错误:

  root@agrover-OptiPlex-780:~# easy_install -U eventlet
Searching for eventlet
Reading http://pypi.python.org/simple/eventlet/
Reading http://wiki.secondlife.com/wiki/Eventlet
Reading http://eventlet.net
Best match: eventlet 0.9.16
Processing eventlet-0.9.16-py2.7.egg
eventlet 0.9.16 is already the active version in easy-install.pth

Using /usr/local/lib/python2.7/dist-packages/eventlet-0.9.16-py2.7.egg
Processing dependencies for eventlet
Searching for greenlet>=0.3
Reading http://pypi.python.org/simple/greenlet/
Reading https://github.com/python-greenlet/greenlet
Reading http://bitbucket.org/ambroff/greenlet
Best match: greenlet 0.3.4
Downloading http://pypi.python.org/packages/source/g/greenlet/greenlet- 0.3.4.zip#md5=530a69acebbb0d66eb5abd83523d8272
Processing greenlet-0.3.4.zip
Writing /tmp/easy_install-_aeHYm/greenlet-0.3.4/setup.cfg
Running greenlet-0.3.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_aeHYm/greenlet-0.3.4/egg-dist-tmp-t9_gbW
In file included from greenlet.c:5:0:
greenlet.h:8:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1`

为什么找不到Python.h

最佳答案

您的安装失败,因为您没有安装 python 开发头文件。您可以通过 ubuntu/debian 上的 apt 执行此操作:

sudo apt-get install python-dev 

python3 使用:

sudo apt-get install python3-dev

对于 eventlet,您可能还需要安装 libevent 库,因此如果您遇到错误,您可以使用以下方法安装 libevent:

sudo apt-get install libevent-dev

关于python - 错误 : command 'gcc' failed with exit status 1 while installing eventlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11094718/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com