I have issues installing pycrypto (and thus fabric) with pip

Kwpolska kwpolska at gmail.com
Mon Jan 28 12:13:12 EST 2013


On Mon, Jan 28, 2013 at 4:21 PM, Nicholas Kolatsis <nkolatsis at gmail.com> wrote:
> I'm not sure this is the right place for this

It is

> but I'm don't know where else to put this.

Here. (s/I’m/I/)
> I want to give fabric a try (as recommended here: http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/). Installing fabric results in two dependencies (paramiko and pycrypto) being installed as well. All is dandy until it is time to install pycrypto.

Note that Fabric is useful for much, MUCH more than this.

> (dp130128)cheeky at n5110:~/proj/dp130128$ pip install fabric

Off-topic: why is your virtualenv/project name so weird?

> Downloading/unpacking fabric
>   Running setup.py egg_info for package fabric
>
>     warning: no previously-included files matching '*' found under directory 'docs/_build'
>     warning: no previously-included files matching '*.pyc' found under directory 'tests'
>     warning: no previously-included files matching '*.pyo' found under directory 'tests'
> Downloading/unpacking paramiko>=1.9.0 (from fabric)
>   Running setup.py egg_info for package paramiko
>
> Downloading/unpacking pycrypto>=2.1,!=2.4 (from paramiko>=1.9.0->fabric)
>   Running setup.py egg_info for package pycrypto
>
> Installing collected packages: fabric, paramiko, pycrypto
>   Running setup.py install for fabric
>
>     warning: no previously-included files matching '*' found under directory 'docs/_build'
>     warning: no previously-included files matching '*.pyc' found under directory 'tests'
>     warning: no previously-included files matching '*.pyo' found under directory 'tests'
>     Installing fab script to /home/cheeky/.virtualenvs/dp130128/bin
>   Running setup.py install for paramiko
>

Seems to be properly installed.

>   Running setup.py install for pycrypto
>     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

Here comes your problem: you do not have the Python header files,
required to compile the C code used by pycrypto (for speed in certain
operations, because they are quite resource-intensive).  Where can you
get them?  I don’t know, ask your distro.  They are usually in a
package ending with -dev or -devel (depending on your distro; human
distros do not bother with this and ship them along with the rest of
the thing…)

-- 
Kwpolska <http://kwpolska.tk> | GPG KEY: 5EAAEA16
stop html mail                | always bottom-post
http://asciiribbon.org        | http://caliburn.nl/topposting.html



More information about the Python-list mailing list