python pycrypto installation error [duplicate] - python

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
PyCrypto and GMP library not found error [Mac OS 10.6.3]
I'm trying to install pycrypto on ubuntu, but it throws error
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
I have installed python-dev tools already.

You are missing the Python development libraries. (Try apt-get install python-dev.)
However, unless you have a valid reason to compile pycrypto yourself, just install it via (I think) apt-get install python-crypto.

Related

error while installing python-mcrypt-1.1 in virtual env - fatal error: mcrypt.h: No such file or directory

I am trying to install python-mcrypt-1.1 with below command
pip install http://labix.org/download/python-mcrypt/python-mcrypt-1.1.tar.gz
but i am getting below error i have tried with sudo permission as well but not able to install and getting below error
running install
running build
running build_ext
building 'mcrypt' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="1.1" -I/usr/include/python2.7 -c mcrypt.c -o build/temp.linux-x86_64-2.7/mcrypt.o
mcrypt.c:23:20: fatal error: mcrypt.h: No such file or directory
#include <mcrypt.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
python-mcrypt is a Python interface to the mcrypt library. You have to install mcrypt first.
found the solution for this issue .
For mcrypt.h, libmcrypt-dev needs to install by following command
sudo apt-get install libmcrypt-dev
after installing with above command python-crypt got install successfully with below command
pip install http://labix.org/download/python-mcrypt/python-mcrypt-1.1.tar.gz

Installing pycrypto on raspbian for python 3.2.3

Im trying to crate a cryptosystem on the raspbian OS. Chose python and pycrypto because the OS comes with python 3.2.3 pre-installed. Moved the "pycrypto-2.6.1.tar.gz" to the folder where python files are located and extracted there. Suposed to build using the command "python setup.py build" and then install.
But during the build phase, keep getting the error:
"pi#raspberrypi /usr/lib/python3.2/pycrypto-2.6.1 $ python setup.py buildrunning 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 -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-armv6l-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
"
Not able to figure out whether I am supposed to change the pathing. Could somebody give an insight in to this?
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
The libgmp-dev package provides the necessary files to support building the optimized module here:
apt-get install libgmp-dev
src/MD2.c:31:20: fatal error: Python.h: No such file or directory
compilation terminated.
If you search for fatal error: Python.h: No such file or directory, the very first Google result is for this StackOverflow question, which tells you that you need to install the python-dev package:
apt-get install python-dev
In general, if you are building software from source you will need the corresponding -dev package for any required libraries; these packages provide header files (foo.h) and the unversioned shared libraries necessary for linking.

aspell-python installation error

I am trying to install aspell-python package for spell correction.
Facing problem while installing the package.
Error :
python setup.py install
running install
running build
running build_ext
building 'aspell' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c aspell.c -o build/temp.linux-i686-2.7/aspell.o
aspell.c:53:20: fatal error: aspell.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
GCC is already install version gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
libaspell15 is already install
Need to install sudo apt-get install libaspell-dev

Pybluez installation in Linux

I am trying to install PyBluez-0.18 on my Linux Mint 15 machine, but got an error message during the installation process. I tried searching online to see if others might have encountered this problem, but I could not find any.
I list the command I tried to execute, along with the error message I received. Could someone tell me what I am doing wrong, and what I need to do to reso
tri108354#prtgc004-Latitude-E6320 ~/Downloads/PyBluez-0.18 $ python setup.py install
running install
running build
running build_py
running build_ext
building 'bluetooth._bluetooth' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/tri108354/anaconda/include/python2.7 -c bluez/btmodule.c -o build/temp.linux-i686-2.7/bluez/btmodule.o
In file included from bluez/btmodule.c:20:0:
bluez/btmodule.h:5:33: fatal error: bluetooth/bluetooth.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1
You need to install libbluetooth-dev package for compiling your code
sudo apt-get install libbluetooth-dev
That should install the bluetooth header files.

Cython Install GCC error

Trying to install Cython on a small VPS running Ubuntu Server. Did
sudo apt-get install gcc
and then
python setup.py install
In the Cython directory, but I get this peculiar error.
running install
running build
running build_py
running build_ext
building 'Cython.Plex.Scanners' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.6 -c Cython/Plex/Scanners.c -o build/temp.linux-x86_64-2.6/Cython/Plex/Scanners.o
Cython/Plex/Scanners.c:4:20: error: Python.h: No such file or directory
Cython/Plex/Scanners.c:6:6: error: #error Python headers needed to compile C extensions, please install development version of Python.
error: command 'gcc' failed with exit status 1
Why should I need a 'development version of Python'? Running Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41). Thanks!
You need the developer version of Python - i.e. the Python header files (Python.h)
sudo apt-get install python-dev
You need the headers included in the development version of Python, i.e. python.h. It should be packaged in Ubuntu as python-dev.

Categories