On OSX 10.8.3 with 32-bit Python 2.7.5, the gevent.monkey.patch_all() statement causes the error:
Python 2.7.5 (default, May 22 2013, 11:37:55)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.27)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import gevent.monkey; gevent.monkey.patch_all()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-1.0rc2-py2.7-macosx-10.8-intel.egg/gevent/monkey.py", line 181, in patch_all
patch_thread(Event=Event)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-1.0rc2-py2.7-macosx-10.8-intel.egg/gevent/monkey.py", line 106, in patch_thread
patch_module('thread')
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-1.0rc2-py2.7-macosx-10.8-intel.egg/gevent/monkey.py", line 62, in patch_module
gevent_module = getattr(__import__('gevent.' + name), name)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-1.0rc2-py2.7-macosx-10.8-intel.egg/gevent/thread.py", line 28, in <module>
from gevent.lock import Semaphore as LockType
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gevent-1.0rc2-py2.7-macosx-10.8-intel.egg/gevent/lock.py", line 5, in <module>
from gevent._semaphore import Semaphore
ImportError: dynamic module does not define init function (init_semaphore)
>>> gevent.__version__
'1.0rc2'
Any ideas how to solve this?