2012-04-10 138 views
1

我運行Ubuntu 11.10,gcc版本4.6.1。命令'gcc'失敗,退出狀態爲1(安裝psyco)

我一直在試圖安裝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的,但沒有到目前爲止的工作。感謝您的建議。

+0

嘗試安裝build-essential,以及python2.x-dev(其中x是你的python版本) – Bartek 2012-04-10 11:27:17

+0

試過了,它們被安裝到最新版本 – 2012-04-10 11:52:48

+0

Psyco已經死了。如果您需要速度,請考慮使用Cython或PyPy。 – 2012-04-10 14:34:12

回答

3

Google是你的朋友:psyco不會構建並且不能與Python 2.7一起使用,如相應的Ubuntu bug report中所記錄的。

爲什麼需要Psyco?如果您需要優化緊密環路,可能需要Cython來救援。

-1

也許你應該得到 「https://github.com/develersrl/gccwinbinaries」 安裝路徑:C:/ MinGW和安裝路徑:C:/ MinGW的/ bin中。最後,找到distutils.cfg在Python安裝目錄d:/ Python26 /庫/的distutils

+0

[build] compiler = mingw32 – 2017-09-26 02:32:12

+0

提問者表示他們使用Ubuntu,一個Linux發行版,而你的答案是非常特定於Windows的,並且完全針對你的安裝。 – Avery 2017-09-26 02:58:13

相關問題