Search code examples
pythonubuntuinstallationpipgrequests

Trying to install grequests on Ubuntu?


When I try to install grequests on Ubuntu with pip:

sudo pip install grequests

I get this error, but my gcc seems fine:

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

Solution

  • You need to install libevent, which on Ubuntu can be done with:

    apt-get install libevent-dev 
    

    Alternatively, to install gevent and all it's dependencies automatically:

    apt-get install python-gevent