命令'gcc'失败,退出状态为1(安装psycho)

时间:2012-04-10 11:17:13

标签: python gcc compiler-errors

我运行Ubuntu 11.10,gcc版本4.6.1。

我一直在尝试安装psyco,但不断收到此错误:

PROCESSOR = 'i386'
running build
running build_py
running build_ext
building 'psyco._psyco' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DALL_STATIC=1 -Ic/i386 -I/usr/include/python2.7 -c c/psyco.c -o build/temp.linux-i686-2.7/c/psyco.o
In file included from c/initialize.h:55:0,
                 from c/psyco.c:14:
c/mergepoints.c:242:3: error: ‘JUMP_IF_FALSE’ undeclared here (not in a function)
c/mergepoints.c:242:3: error: ‘JUMP_IF_TRUE’ undeclared here (not in a function)
c/codegen.c:127:19: warning: ‘psyco_source_condition’ defined but not used [-Wunused-function]
c/codegen.c:747:10: warning: ‘integer_lshift’ defined but not used [-Wunused-function]
c/Objects/plistobject.c:115:10: warning: ‘PsycoList_SingletonNew’ defined but not used [-Wunused-function]
error: command 'gcc' failed with exit status 1

我已经安装了python-setuptools但到目前为止没有任何工作。谢谢你的建议。

2 个答案:

答案 0 :(得分:3)

Google是您的朋友:psyco不会构建,也不会与Python 2.7一起使用,如相应的Ubuntu bug report中所述。

为什么要求Psyco?如果您需要优化紧密循环,可能Cython可以帮助您解决问题。

答案 1 :(得分:-1)

也许你应该得到" https://github.com/develersrl/gccwinbinaries"安装路径:C:/ mingw和安装路径:C:/ mingw / bin。最后,在python安装目录下找到distutils.cfg:/ Python26 / Lib / distutils

相关问题