如何在Mac OS 10.6.8上为Python 2.5安装pycrypto?

时间:2012-01-28 02:24:10

标签: python macos pycrypto

为了准备我的系统,我按照blog的说明进行操作。重点是

  

从那里开始,按照默认设置,直到进入“Macintosh HD'上的自定义安装”屏幕。一切都已检查,但“MAC OS X 10.4支持”,这是您要安装的程序。

有了这个,我下载了PyCrypto tarball,并尝试安装它:

$ 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

安装过程中是否有任何遗漏?

2 个答案:

答案 0 :(得分:0)

我只是pip install pycryptoeasy_install pycrypto

答案 1 :(得分:0)

在Mac OS X上成功安装pycrypto所需的条件:

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