>>> import gevent
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.macosx-10.6-universal/egg/gevent/__init__.py", line 41, in <module>
  File "build/bdist.macosx-10.6-universal/egg/gevent/core.py", line 7, in <module>
  File "build/bdist.macosx-10.6-universal/egg/gevent/core.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/admin/.python-eggs/gevent-0.13.6-py2.6-macosx-10.6-universal.egg-tmp/gevent/core.so, 2): Symbol not found: _event_global_current_base_
  Referenced from: /Users/admin/.python-eggs/gevent-0.13.6-py2.6-macosx-10.6-universal.egg-tmp/gevent/core.so
  Expected in: flat namespace
 in /Users/admin/.python-eggs/gevent-0.13.6-py2.6-macosx-10.6-universal.egg-tmp/gevent/core.so

What's this about? I did not get any errors during the installation

link|improve this question
feedback

migrated from stackoverflow.com Jun 29 '11 at 15:13

This question came from our site for professional and enthusiast programmers.

1 Answer

This response/solution was found here.

Libevent

First I like to grab libevent via macports. Ignore this if you’ve already done it on your system.

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.

Install cython

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
link|improve this answer
feedback

Your Answer

 
or
required, but never shown