OSX: ImportError: dynamic module does not define init function (init_semaphore)

202 views
Skip to first unread message

dbv

unread,
May 23, 2013, 6:50:35 PM5/23/13
to gev...@googlegroups.com
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?

dbv

unread,
May 24, 2013, 10:16:01 AM5/24/13
to gev...@googlegroups.com
This may provide clues

a. OSX 10.8.3, 64-bit Python
import gevent.monkey; gevent.monkey.patch_all() - works perfectly.

a. OSX 10.8.3, 32-bit Python (started w/ arch -i386 python)
import gevent.monkey; gevent.monkey.patch_all() - doesn't work and spews out error messages given in previous message.

Thx!


Reply all
Reply to author
Forward
0 new messages