1

我运行 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 但到目前为止没有任何效果。感谢您的任何建议。

4

2 回答 2

3

Google 是您的朋友:如相应的Ubuntu 错误报告中所述,psyco 不构建 Python 2.7,也不能与 Python 2.7 一起使用。

为什么需要 Psyco?如果您需要优化紧密循环,Cython可能会为您提供帮助。

于 2012-04-10T14:27:34.970 回答
-1

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

于 2017-09-26T02:31:33.783 回答