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

21,113

Solution 1

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

Solution 2

This is how I do it to make it work:

  1. Download the latest gevent source from github: gevent
  2. replace the source code in C:\Python27\lib\site-packages\gevent\ with the download source code.
Share:
21,113
Reality Returns
Author by

Reality Returns

Updated on July 21, 2022

Comments

  • Reality Returns
    Reality Returns almost 2 years

    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.

  • nimig18
    nimig18 almost 4 years
    dude ur my savior!