当我尝试用pip在Ubuntu上安装grequests时:
sudo pip install grequests我明白这个错误,但我的gcc似乎很好:
In file included from gevent/core.c:253:0:
gevent/libevent.h:9:19: fatal error: event.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1发布于 2013-09-25 22:33:10
您需要安装libevent,在Ubuntu上可以这样做:
apt-get install libevent-dev 或者,自动安装gevent及其所有依赖项:
apt-get install python-gevent发布于 2013-09-25 22:32:19
sudo apt-get install libevent-dev
发布于 2013-09-25 22:33:32
grequests依赖于Python模块gevent,而pip将自动为您提取该模块。
gevent依赖于C库libevent,pip不可能为您处理这个问题。因此,您需要手动安装它,例如,使用发行版的包管理器。
(或者,gevent 1.0及更高版本不再依赖libevent或任何其他外部依赖项。但是,截至2013年9月25日,1.0还没有发布…)
https://stackoverflow.com/questions/19016265
复制相似问题