"gcc" failed with exit status 1 when trying to install gevent-websocket

I try to install gevent-websocket for Python (http://www.gelens.org/code/gevent-websocket/), but when I run easy_install gevent-websocket, I get the command "gcc" with an exit status error of 1 ".

Below is the full terminal output.

tgarv@tommy-Studio-1537 :~/Desktop/Code$ sudo easy_install gevent-websocket install_dir /usr/local/lib/python2.6/dist-packages/ Searching for gevent-websocket Best match: gevent-websocket 0.3.4 Processing gevent_websocket-0.3.4-py2.6.egg gevent-websocket 0.3.4 is already the active version in easy-install.pth Using /usr/local/lib/python2.6/dist-packages/gevent_websocket-0.3.4-py2.6.egg Processing dependencies for gevent-websocket Searching for gevent Reading http://pypi.python.org/simple/gevent/ Reading http://www.gevent.org/ Reading http://gevent.org/ Best match: gevent 0.13.6 Downloading http://pypi.python.org/packages/source/g/gevent/gevent-0.13.6.tar.gz#md5=7c836ce2315d44ba0af6134efbcd38c9 Processing gevent-0.13.6.tar.gz Running gevent-0.13.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-zChaNp/gevent-0.13.6/egg-dist-tmp-cPxcYh In file included from gevent/core.c:225: gevent/libevent.h:9: fatal error: event.h: No such file or directory compilation terminated. error: Setup script exited with error: command 'gcc' failed with exit status 1 tgarv@tommy-Studio-1537 :~/Desktop/Code$ 

I also get the same error when trying to install pip, so I don't know a bit what to do next. The result says that β€œgevent-websocket 0.3.4 is already an active version in easy-install.pth,” and I'm not sure what that means, but I know that if I try to import a gevent or geventwebsocket, it says the module does not exist.

+7
source share
2 answers
 gevent/libevent.h:9: fatal error: event.h: No such file or directory 

Install the libevent development package for your distribution.

On Ubuntu, it is libevent-dev .

+13
source

If you are using the Ubuntu type, follow these steps:

  sudo apt-get install libevent-dev pip install gevent 
+5
source

All Articles