gevent library: "Import Error: no module named greenlet"

Reality Returns picture Reality Returns · Sep 7, 2012 · Viewed 19.1k times · Source

hello guys I have downloaded a script that require gevent python library and every time I run the script it says :

 File "shodan.py", line 7, in <module>
   from gevent import monkey
 File "C:\Python27\lib\site-packages\gevent\__init__.py", line 48, in <module>
   from gevent.greenlet import Greenlet, joinall, killall
 File "C:\Python27\lib\site-packages\gevent\greenlet.py", line 6, in <module>
   from gevent.hub import greenlet, getcurrent, get_hub, GreenletExit, Waiter
 File "C:\Python27\lib\site-packages\gevent\hub.py", line 30, in <module>
   greenlet = __import__('greenlet').greenlet    
ImportError: No module named greenlet

I have successfully downloaded and installed gevent and i'm just confused can someone give me the solution and explain the problem.

Answer

aga picture aga · Sep 7, 2012

Try to install greenlet via pip like so: pip install greenlet.