2012-01-28 81 views
3

要准备我的系统,我也跟着从这个blog的说明。最关键的一点是如何在Mac OS 10.6.8上安装Python 2.5的pycrypto?

From there, follow the defaults until you get to the “Custom Install on ‘Macintosh HD’” screen. Everything is checked but “MAC OS X 10.4 Support” and that is the program that you want to install.

有了这样的出路,我下载了PyCrypto压缩包,并试图安装它:

$ curl -O http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.5.tar.gz 
$ tar xvzf pycrypto-2.5.tar.gz 
$ cd pycrypto-2.5 
$ python2.5 setup.py install 

建设一些二进制文件后,我会在底部出现以下错误的倾倒:

cc1: error: unrecognized command line option "-Wno-long-double" 
cc1: error: unrecognized command line option "-Wno-long-double" 
lipo: can't figure out the architecture type of: /var/folders/hk/hkor0sZBGkuucGbVfeQgO++++TI/-Tmp-//ccRzz4H0.out 
error: command 'gcc' failed with exit status 1 

有没有什么我在安装时错过了?

回答

0

我只是做pip install pycryptoeasy_install pycrypto

+0

出现同样的错误,当我执行,在一个'virtualenv' – Kit 2012-01-28 02:43:22

+0

'LD:在/ usr非法文本搬迁 '___gmp_binvert_limb_table' /local/lib/libgmp.a(mp_minv_tab.o)从在/usr/local/lib/libgmp.a(dive_1.o“___gmpn_divexact_1”),用于建筑x86_64的 铛:错误:连接器命令,退出代码1(使用失败-v看到调用) 错误:安装程序脚本退出时出现错误:命令'cc'失败,退出状态1'不工作 – andi 2014-05-20 09:31:23

0

你需要在Mac OS X成功地安装pycrypto什么:

ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future pip install pycrypto