First try
$ sudo pip install gevent
If that fails with
gevent/libevent.h:9:19: error: event.h: No such file or directory
then do either of the following.
$ brew install libevent $ sudo pip install gevent
$ sudo port install libevent $ CFLAGS="-I /opt/local/include -L /opt/local/lib" pip install gevent