gevent does not install properly on Ubuntu gevent does not install properly on Ubuntu python python

gevent does not install properly on Ubuntu


On Ubuntu 10.04 with python 2.6 I had to do:

apt-get install libevent-devapt-get install python-all-deveasy_install greenleteasy_install gevent 

By the way, nice tutorial on Gevent: http://sdiehl.github.com/gevent-tutorial/


In Ubuntu 10.10 (and later), gevent (and dependencies) is packaged in the Ubuntu repositories.

on 11.04:

$ sudo apt-get install python-gevent...$ pythoncorey@lenovo:~$ pythonPython 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import gevent>>> from gevent import socket>>> print gevent.__version__0.13.0


I managed to succeed to install in a "python way" using pip. Here is what I did:

I read somewhere that it seems like Ubuntu's setup tools are broken. When you want to install a package, it reports

UserWarning: Unbuilt egg for setuptools [unknown version] (/usr/lib/python2.6/dist-packages)

These commands repare the setup tools:

sudo rm -rf /usr/lib/python2.6/dist-packages/setuptools.egg-info/sudo apt-get install --reinstall python-setuptools

After this, I tried to reinstall the two packages with pip's --upgrade argument. It didn't help, but I tried easy_install and it worked. I had tried it before pip, but the broken setup tools prevented it from working.

sudo easy_install greenletsudo easy_install gevent

There you go, with the latest version (0.13.6 as of now).