2013-01-02 32 views
0

我有PyCrypto 2.6版本,我已經從更新日誌讀取2.4或更高版本PyCrypto的版本支持Python 3 我嘗試使用PyCrypto不工作的Python 3.2

# python3 setup.py install

安裝它,但它給出了我這個錯誤



running install 
running build 
running build_py 
running build_ext 
running build_configure 
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath. 
building 'Crypto.Hash._MD2' extension 
gcc -pthread -fwrapv -Wall -Wstrict-prototypes -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python3.2mu -c src/MD2.c -o build/temp.linux-x86_64-3.2/src/MD2.o 
src/MD2.c:31:20: fatal error: Python.h: No such file or directory 
compilation terminated. 
error: command 'gcc' failed with exit status 1 
+0

如果你在Ubuntu上,安裝'python3-devel'或'python-devel'。 – Blender

+0

Blender python3-devel僅適用於fedora,mandriva,open suse和Megia Linux ,但是對於Ubuntu有一些大的python3軟件包列表可供選擇,這裏列出的是http://packages.ubuntu.com/source/precise/python3-默認值 –

+0

我不使用Ubuntu,所以我不知道軟件包的名字。嘗試安裝'python3-dev'。 – Blender

回答

1

我在Ubuntu 13.04 python3.3 pycrypto上有類似的問題。

安裝python3.3-dev包解決了這個問題。

請嘗試安裝python3.2-dev或類似視您的分佈而定。

0

我解決了這個通過使該步驟:

  1. 的./configure
  2. 蟒蛇的setup.py建立
  3. 蟒蛇的setup.py安裝

希望這將幫助你!對我來說很好