Archive
Installing gevent from source on Windows
I was trying to install Gevent from source on my windows machine using virtualenv. So lets start from the beggining:
c:\Python27\python.exe virtualenv.py --distribute sandbox_gevent
sandbox_gevent\Scripts\activate
pip install gevent
Problems
As usual, problems are waiting to happen.
Downloading/unpacking gevent
Downloading gevent-0.13.8.tar.gz (300kB): 300kB downloaded
Running setup.py egg_info for package gevent
Please provide path to libevent source with --libevent DIR
Complete output from command python setup.py egg_info:
Please provide path to libevent source with --libevent DIR
Fix
libevent is missing so we have to install it. From source 🙂
Download https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz and unpack it. You don’t have to build this, it is only used by gevent in the build process.
Retry
pip install gevent --install-option="--libevent path\to\libevent\source"
Problems, again
Here it is again.
Downloading/unpacking gevent
Downloading gevent-0.13.8.tar.gz (300kB): 300kB downloaded
Running setup.py egg_info for package gevent
Please provide path to libevent source with --libevent DIR
Complete output from command python setup.py egg_info:
Please provide path to libevent source with --libevent DIR
As it turns out the --install-option
switch doesn’t work. Maybe it could be fixed somehow but I found it is easier to install gevent directly from source.
Installation gevent from source
First download gevent source and unpack it. And then run this:
cd path\to\gevent\source
python setup.py build --libevent path\to\libevent\source
python setup.py install --libevent path\to\libevent\source
Done 🙂
I have VS2008 installed so if you don’t try to get at least the VC 2008 redistributable and the platform SDK to get the files needed to compile this.