Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gevent does not install properly on Ubuntu

Tags:

python

gevent

I want to experiment with gevent, but after installing it I can't load any gevent module.

The installation steps are:

sudo apt-get install libevent-dev sudo pip install greenlet sudo pip install gevent 

The environment setup is Ubuntu 10.10 x86_64 GNU/Linux.

When I try to do a simple test, I get:

>>> import gevent >>> from gevent import socket Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: cannot import name socket 

I suspect the installation not doing what it should, but I'm not sure what wrong.

like image 760
FabienB Avatar asked Jun 21 '11 19:06

FabienB


1 Answers

On Ubuntu 10.04 with python 2.6 I had to 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/

like image 85
zzart Avatar answered Oct 03 '22 00:10

zzart