试图在Ubuntu上安装grequests?

kfa*_*fan 5 python ubuntu install pip grequests

当我尝试使用pip在Ubuntu上安装grequests时:

sudo pip install grequests
Run Code Online (Sandbox Code Playgroud)

我收到此错误,但我的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
Run Code Online (Sandbox Code Playgroud)

Zag*_*ags 7

你需要安装libevent,它可以在Ubuntu上完成:

apt-get install libevent-dev 
Run Code Online (Sandbox Code Playgroud)

或者,自动安装gevent及其所有依赖项:

apt-get install python-gevent
Run Code Online (Sandbox Code Playgroud)