Installing PyCrypto on Ubuntu - Fatal Build Error

Having looked at other similar streams, I still cannot start pycrypto.

I am trying to make it work on my Ubuntu laptop, but I could not manage it on my Windows PC either.

I downloaded pycrypto-2.6, extracted it and launched

python setup.py build 

but then it happened

 warning: GMP or MPIR 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.7 -c src/MD2.c -o build/temp.linux-i686-?2.7/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 

Would thank for any help.

+49
python pycrypto
Jul 22 2018-12-12T00:
source share
2 answers

You need to install Python development files. I believe this will do:

 sudo apt-get install python-dev 
+128
Jul 22 2018-12-12T00
source share
— -

On Ubuntu, I needed other packages for success:

 apt-get install autoconf g++ python2.7-dev pip install pycrypto 
+18
Feb 05
source share



All Articles