嗨,我对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
感谢
HLM
答案 0 :(得分:0)
编辑: 按照here的说明使用4.2而不是4.1作为gcc的版本。
试试他的:
sudo apt-get install python-pip
pip
是一个python包管理器:pip = pip installs packages。然后,
sudo pip install StarCluster
然后你可以启动python并导入starcluster:
python
import starcluster
您可以对pycrypto
执行相同操作:
sudo pip install pycrypto