3

When I build 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 architecture with CFLAGS="-arch x86_64", but it does not work.

Jintwo
  • 73
  • 1
  • 5

2 Answers2

2

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

Jintwo
  • 73
  • 1
  • 5
0

The gevent releases include the generated .c sources so you don't need Cython to build them.

The development version (1.0) also has automatically generated tarballs that includes those .c files: http://code.google.com/p/gevent/downloads/list

Denis
  • 3,760
  • 25
  • 22
  • Building with CFLAGS="-arch x86_64" - gevent/core.so: mach-o, but wrong architecture. Building with CFLAGS="-arch i386" - dynamic module does not define init function (initcore). – Jintwo Jun 08 '11 at 11:03