GCC 安装 Python 加密 CentOS 7 时出错 64.



我更新了 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('rn', '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('rn', '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/

我到处寻找解决方案,但没有运气这是我的软件包版本:

蟒蛇 2.7.5蟒蛇 3.4.5pip 9.0.1 from/usr/lib/python3.4/site-packages (python 3.4(

执行yum install -y python34-devel,因为您缺少它提供的库。如果您没有软件包,则存储库中可能没有 EPEL。用yum install epel-release .

最新更新