python pycrypto安装错误

标签 python pycrypto

<分区>

Possible Duplicate:
PyCrypto and GMP library not found error [Mac OS 10.6.3]

我试图在 ubuntu 上安装 pycrypto,但它抛出错误

hom@PC71:~/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 工具。

最佳答案

您缺少 Python 开发库。 (尝试 apt-get install python-dev。)

但是,除非您有正当理由自己编译 pycrypto,否则只需通过(我认为)apt-get install python-crypto 安装即可。

关于python pycrypto安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7845963/

相关文章:

python - 如何在不改变python中元素位置的情况下对列表列表中的元素进行排序?

Python 中的 PHP openssl AES

python - PyCrypto 2.6 安装问题

python - AES 加密中的 IV must be 16 bytes long 错误

python - 如何在pycrypto中使用AES的CFB模式

python - 在 Python 中从 AWS S3 读取 gzip 文件的内容

python - Panda3D与Python,只渲染一帧等问题

python - 如何解决 "ValueError: attempted relative import beyond top-level package"

python - 如何在python中动态创建类的实例?

python - 如何将字符串加密成大小相同的字符串是Python