Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.pionier.net.pl!feed.xsnews.nl!border03.ams.xsnews.nl!feeder03.ams.xsnews.nl!abp002.ams.xsnews.nl!frontend-F10-20.ams.news.kpn.nl From: Cecil Westerhof Newsgroups: comp.lang.python Subject: Re: Cannot update OpenSSL for Python3 Organization: Decebal Computing References: <87k2wok9bz.fsf@Equus.decebal.nl> <878ud4k270.fsf@Equus.decebal.nl> <874mnsjxju.fsf@Equus.decebal.nl> X-Face: "(y8cC@tg_12{">GF'UXTW]FHI2wMiZNrnf'1EFQ&O#$m:f#O7+7}kR,v+Pti8=Vi/Z"g^?b"E X-Homepage: http://www.decebal.nl/ Date: Mon, 04 May 2015 17:11:51 +0200 Message-ID: <87vbg8idhk.fsf@Equus.decebal.nl> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:kekyJUqmuqv9/gUIVDteJpeODnw= MIME-Version: 1.0 Content-Type: text/plain Lines: 39 NNTP-Posting-Host: 81.207.62.244 X-Trace: 1430753329 news.kpn.nl 21163 81.207.62.244@kpn/81.207.62.244:49798 Xref: csiph.com comp.lang.python:89913 Op Monday 4 May 2015 16:18 CEST schreef Chris Angelico: > On Mon, May 4, 2015 at 11:13 PM, Cecil Westerhof 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 > > 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. :-( Now I get: c/../_cffi1/ffi_obj.c:489:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] PyObject *u = PyUnicode_DecodeLatin1(PyBytes_AS_STRING(res), ^ cc1: some warnings being treated as errors -- Cecil Westerhof Senior Software Engineer LinkedIn: http://www.linkedin.com/in/cecilwesterhof