1

嗨,我对 python 很陌生......所以如果这是一个愚蠢的问题,请原谅我......

安装 python 2.7.3 后,我想安装StarCluster我尝试通过命令执行的包:

$ sudo easy_install StarCluster

但这在安装依赖包时会导致错误,pycrypto因此尝试使用以下命令单独安装它:

$ easy_install pycrypto

但收到以下错误消息....我错过了我需要做的事情吗?

Searching for pycrypto
Reading http://pypi.python.org/simple/pycrypto/
Reading http://pycrypto.sourceforge.net
Reading http://www.pycrypto.org/
Reading http://www.amk.ca/python/code/crypto
Best match: pycrypto 2.6
Downloading http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz
Processing pycrypto-2.6.tar.gz
Running pycrypto-2.6/setup.py -q bdist_egg --dist-dir /var/folders/N3/N3c0k2wGFciTmmsVNCCRE++++TI/-Tmp-/easy_install-udIVh6/pycrypto-2.6/egg-dist-tmp-K6hQbK
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
/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/MD2.c:147: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/folders/N3/N3c0k2wGFciTmmsVNCCRE++++TI/-Tmp-//ccyyE9rh.out (No such file or directory)
error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1

谢谢

高级管理人员

4

1 回答 1

0

编辑:按照此处的说明使用 4.2 而不是 4.1 作为 gcc 的版本。


试试他的:

sudo apt-get install python-pip

pip是一个 python 包管理器: pip=pip 安装包。然后,

sudo pip install StarCluster

然后就可以启动python并导入starcluster了:

python
import starcluster

您可以使用以下方法执行相同操作pycrypto

sudo pip install pycrypto
于 2012-11-28T22:45:03.970 回答