2012-01-28 82 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