I tried to install gevent today but had some issues on OSX 10.6.7 and Python 2.7.1. This version of python is a pretty safe bet with wide support for various libs. As always you should be using virtualenv.
Lets get started (at this point you should have already setup a virtualenv environment). You’ll note that I like to build each package separately as any number of issues could arrise in the build process. With less noise I’m able to debug the issues, I recommend you do the same unless you know for sure your setup is ready to go and expect no issues ;-)
sudo ports install libevent
Alternatively you could build it yourself or use Homebrew. By the way, both MacPorts and Homebrew do use the newer Libevent2.X.X branch.
pip install cython
Install greenlet (optional as gevent will build this).
pip install greenlet
Clone, Build, Install gevent.
hg clone https://bitbucket.org/denis/gevent
I like to first build gevent to see if everything went right. Change to the gevent directory first and then:
python setup.py build
If all went well go ahead and install:
python setup.py install
Note on MacPorts
If you installed Python 2.7 from MacPorts, you’ll be happy to see they’ve already got a gevent port for you. Install like so:
sudo port install py27-gevent