gcc安装python加密系统centos 7时出错64

gcc安装python加密系统centos 7时出错64,python,python-3.x,centos,centos7,Python,Python 3.x,Centos,Centos7,我有一个Centos 7 64位更新版。 我正在尝试使用以下命令安装python加密: pip install cryptography 但我得到了这个错误信息: Failed to build cryptography Installing collected packages: cryptography Running setup.py install for cryptography ... error Complete output from command /usr/bin/pyt

我有一个Centos 7 64位更新版。 我正在尝试使用以下命令安装python加密:

 pip install cryptography
但我得到了这个错误信息:

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/
我到处寻找解决办法,但运气不好 以下是我的软件包版本:

Python 2.7.5 Python 3.4.5
来自/usr/lib/python3.4/site-packages-python3.4的pip 9.0.1执行yum安装-y python34-devel,因为您缺少它提供的库。如果您没有这个包,那么您的存储库中可能没有EPEL。使用yum安装epel版本添加它。

是,已经完成。软件包python-devel-2.7.5-48.el7.x86_64已经安装,最新版本I已经编辑了我的答案,因为我注意到您使用的是python3,而不是python2您使用的是python-devel for python2。谢谢,我已经尝试过了,但是centos7没有该软件包:yum安装-y python3-devel加载插件:fastestmirror从缓存的主机文件加载镜像速度*base:centos.fastbull.org*epel:mirror.imt-systems.com*附加:centos.fastbull.org*更新:centos.fastbull.org没有可用的python3-devel软件包我安装了python34-devel.x8664EPL存储库中的0:3.4.5-3.el7,它可以正常工作!