[ACCEPTED]-gevent does not install properly on Ubuntu-gevent

Accepted answer
Score: 66

On Ubuntu 10.04 with python 2.6 I had to 1 do:

apt-get install libevent-dev
apt-get install python-all-dev
easy_install greenlet
easy_install gevent 

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

Score: 16

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

on 11.04:

$ sudo apt-get install python-gevent
$ python
corey@lenovo:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gevent
>>> from gevent import socket
>>> print gevent.__version__
Score: 4

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

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

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

These 8 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 7 tried to reinstall the two packages with 6 pip's --upgrade argument. It didn't help, but 5 I tried easy_install and it worked. I had 4 tried it before pip, but the broken setup 3 tools prevented it from working.

sudo easy_install greenlet
sudo easy_install gevent

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

Score: 3

Tried what zzart posted, but still got an 2 error on Ubuntu Trusty Tahr (14.04):

File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2583, in scan_list
    "Expected ',' or end-of-list in",line,"at",line[p:]
ValueError: ("Expected ',' or end-of-list in", "cffi >= 1.11.5 ; sys_platform == 'win32' and platform_python_implementation == 'CPython'", 'at', " ; sys_platform == 'win32' and platform_python_implementation == 'CPython'")

This 1 fixed it:

sudo pip install --upgrade setuptools pip
sudo easy_install gevent

More Related questions