在MacOS系统上安装Lunatic Python

1 投票
1 回答
548 浏览
提问于 2025-04-16 23:19

我现在正在尝试在我的Mac操作系统上运行lunatic这个Python包。我的问题是,在运行LunPy的makefile时出现了几个错误。
有没有人能告诉我怎么正确安装Lunatic Python包呢?

提前谢谢大家!

lunatic-python-1.0 $ make
python setup.py build
running build
running build_ext
building 'lua-python' extension
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 src/pythoninlua.c -o build/temp.macosx-10.6-universal-2.6/src/pythoninlua.o -rdynamic
src/pythoninlua.c: In function ‘py_convert’:
src/pythoninlua.c:74: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
src/pythoninlua.c: In function ‘py_object_tostring’:
src/pythoninlua.c:335: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
/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
src/pythoninlua.c: In function ‘py_convert’:
src/pythoninlua.c:74: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
src/pythoninlua.c: In function ‘py_object_tostring’:
src/pythoninlua.c:335: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
src/pythoninlua.c: At top level:
src/pythoninlua.c:611: fatal error: error writing to -: Broken pipe
compilation terminated.
src/pythoninlua.c: In function ‘py_convert’:
src/pythoninlua.c:74: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
src/pythoninlua.c: In function ‘py_object_tostring’:
src/pythoninlua.c:335: warning: passing argument 3 of ‘PyString_AsStringAndSize’ from incompatible pointer type
lipo: can't open input file: /var/folders/B3/B3c7Jc4xGW0iy57FwnJ13++++TI/-Tmp-//ccwG6Ppf.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
make: *** [all] Error 1

1 个回答

0

你可能在使用Mac OS X 10.6(雪豹)上自带的Python 2.6,并且你还安装了新的Xcode 4。你需要将ARCHFLAGS这个环境变量设置成某个值,具体的设置方法可以参考这个回答

撰写回答