0

I have PyCrypto version 2.6 and I have read from the changelog that 2.4 or later version of PyCrypto Supports Python 3. I tried to install it using

 # python3 setup.py install 

But it gives me this error



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
Chitrank Dixit
  • 3,961
  • 4
  • 39
  • 59
  • If you're on Ubuntu, install `python3-devel` or `python-devel`. – Blender Jan 02 '13 at 19:26
  • Blender python3-devel is only available for fedora, mandriva , open suse and Megia Linux but for ubuntu has some big list of python3 packages to choose from here is the list http://packages.ubuntu.com/source/precise/python3-defaults – Chitrank Dixit Jan 02 '13 at 19:35
  • I don't use Ubuntu, so I don't know the package names by heart. Try installing `python3-dev`. – Blender Jan 02 '13 at 19:48
  • Thank you so much Blender I have successfully installed pycrypto thanks to **python3-dev** – Chitrank Dixit Jan 02 '13 at 20:30

2 Answers2

1

I had similar problem with pycrypto on python3.3 on Ubuntu 13.04.

Installing python3.3-dev package solved the problem.

Try with installing python3.2-dev or similar depending on your distribution.

0

I solved this by making this steps :

  1. ./configure
  2. python setup.py build
  3. python setup.py install

hope this will help you ! for me its fine

user3854643
  • 1
  • 1
  • 3