Search code examples
xcodecythonkinectosx-snow-leopard

Error compiling Cython on Mac 10.6


Trying to install Cython so I can use openKinect Python wrapper.

I downloaded Xcode from the appstore (no install options. lame).

Im getting the following compile errors when trying to install

I also tried easy_install and that failed as well.

Error Code below

creating build/temp.macosx-10.6-universal-2.6/Cython/Plex
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -    
Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe - 
I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c  
./Cython/Plex/Scanners.c -o build/temp.macosx-10.6-universal-  
2.6/./Cython/Plex/Scanners.o
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler  
(/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as)  
for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
./Cython/Plex/Scanners.c:6694: fatal error: error writing to -: Broken pipe

Solution

  • Before your command (but after any sudo) put

    env ARCHFLAGS="-arch i386 -arch x86_64"
    

    (When installing, you may want to omit the arch you don't have)

    I do not have a Mac, I'm just putting through advice from python easy_install fails with "assembler for architecture ppc not installed" on Mac OS X