Build Cython and gevent on OSX

When I create a gevent, I get an error

    Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.1/bin/cython", line 7, in 
    from Cython.Compiler.Main import main
  File "/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Cython-0.14.1-py2.7-macosx-10.4-i386.egg/Cython/Compiler/Main.py ", line 19, in 
    import code
ImportError: dlopen (/usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Cython-0.14.1-py2.7-macosx-10.4-i386.egg/Cython/Compiler/Code .so, 2): no suitable image found. Did find:
    /usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Cython-0.14.1-py2.7-macosx-10.4-i386.egg/Cython/Compiler/Code.so: mach -o, but wrong architecture

I tried to specify the architecture with CFLAGS = "- arch x86_64", but it does not work.

+3
source share
2 answers

Recompiling gevent-1.0dev and greenlet with CFLAGS = "- arch i386 -arch x86_64" flags is the solution to my problem.

+2
source

Gevent releases include created .c sources, so you don't need Cython to create them.

The development version (1.0) also automatically creates tarballs that include these .c files: http://code.google.com/p/gevent/downloads/list

0
source

All Articles