Reputation: 927
I have a Centos 7 64bit updated. I'm trying to install python cryptography using this command:
pip install cryptography
But I got this error message:
Failed to build cryptography
Installing collected packages: cryptography
Running setup.py install for cryptography ... error
Complete output from command /usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lulu_cn7/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2t0eqhin-record/install-record.txt --single-version-externally-managed --compile:
gcc -pthread -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.4m -c build/temp.linux-x86_64-3.4/_openssl.c -o build/temp.linux-x86_64-3.4/build/temp.linux-x86_64-3.4/_openssl.o
build/temp.linux-x86_64-3.4/_openssl.c:12:24: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lulu_cn7/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-2t0eqhin-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lulu_cn7/cryptography/
I look everywhere for a solution but no luck Here version of my packages:
Python 2.7.5 Python 3.4.5 pip 9.0.1 from /usr/lib/python3.4/site-packages (python 3.4)
Upvotes: 0
Views: 2522
Reputation: 546
Do yum install -y python34-devel
, as you lack the libraries it provides. If you don't have the package, you probably don't have EPEL in your repositories. Add it with yum install epel-release
.
Upvotes: 1