Cannot update OpenSSL for Python3

Mark Lawrence breamoreboy at yahoo.co.uk
Mon May 4 14:04:18 EDT 2015


On 04/05/2015 16:11, Cecil Westerhof wrote:
> Op Monday 4 May 2015 16:18 CEST schreef Chris Angelico:
>
>> On Mon, May 4, 2015 at 11:13 PM, Cecil Westerhof <Cecil at decebal.nl> wrote:
>>> That gets installed. And then I get:
>>> ImportError: No module named 'cryptography'
>>>
>>> So I try to install that. This gives: Command /usr/bin/python3 -c
>>> "import setuptools,
>>> tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize,
>>> 'open', open)(__file__).read().replace('\r\n', '\n'), __file__,
>>> 'exec'))" install --record
>>> /tmp/pip-_7jexj87-record/install-record.txt
>>> --single-version-externally-managed --compile failed with error
>>> code 1 in /tmp/pip_build_root/cryptography Storing debug log for
>>> failure in /root/.pip/pip.log
>>>
>>> In the log I see: c/_cffi_backend.c:2:20: fatal error: Python.h: No
>>> such file or directory #include <Python.h>
>>
>> Okay, that one's easy enough to deal with!
>>
>> You have something that needs to build a C extension. To do that,
>> you need to have the Python headers installed. How did you install
>> Python? On Debian/Ubuntu family Linuxes, that's probably "apt-get
>> install python3" - so getting the headers would be "apt-get install
>> python3-dev". Give that a try, and then retry the pip install.
>
> I should have thought about that myself. :-(
>

An alternative is to switch to Windows and do away with this archaic 
concept of users having to build code :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list