尝试安装Cython,以便我可以使用openKinect Python包装器。
我从appstore下载了Xcode(没有安装选项。跛脚)。
尝试安装
时出现以下编译错误我也尝试过easy_install,但也失败了。
以下错误代码
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
答案 0 :(得分:3)
在你的命令之前(但在任何sudo
之后)放
env ARCHFLAGS="-arch i386 -arch x86_64"
(安装时,你可能想省略你没有的拱门)
我没有Mac,我只是接受python easy_install fails with "assembler for architecture ppc not installed" on Mac OS X
的建议答案 1 :(得分:0)
我遇到了同样的问题(使用Cython安装和其他模块)。 使用krzysz00的建议,这里是确切的步骤(Mac OS X 10.6.8):
$ uname -a
Darwin machine_name 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
$ cd Cython-0.14.1
$ sudo su -
# export ARCHFLAGS="-arch i386 -arch x86_64"
# python ./setup.py install
# exit
$
$ which cython
/usr/local/bin/cython