12
可能重复:
PyCrypto and GMP library not found error [Mac OS 10.6.3]蟒蛇pycrypto安装错误
我尝试Ubuntu上安装pycrypto,但它会抛出错误
[email protected]:~/Desktop/pycrypto-2.3$ sudo python setup.py build
running build
running build_py
running build_ext
warning: GMP library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash.MD2' extension
gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.6 -c src/MD2.c -o build/temp.linux-i686-2.6/src/MD2.o
src/MD2.c:31: fatal error: Python.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
我已经安装了Python -dev工具已经。
在linux上运行:如果你已经安装了GMP,但是没有安装pycrypto,你需要安装它们,pycrypto – Ross
“apt-get install python-crypto”在我的Raspberry Pi上为我工作,谢谢! – armani
这解决了我在安装通过pip升级Ansible所必需的依赖关系时遇到的问题:'sudo pip install ansible --upgrade'(其中之一是pycrypto) –