gpt4 book ai didi

python - 在 python3.6 上安装 pycrypto

转载 作者:行者123 更新时间:2023-12-04 19:40:54 25 4
gpt4 key购买 nike

我正在使用 Python 3.6 运行 Centos7。我正在尝试使用命令“pip3 install pycrypto”安装 pycrypto。我还安装了开发工具,所以安装了 gcc。我得到以下输出。
我错过了什么?

    warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Hash._MD2' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -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 -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python3.6m -c src/MD2.c -o build/temp.linux-x86_64-3.6/src/MD2.o
src/MD2.c:31:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-h6pl3s2f/pycrypto/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-9fjag3e5-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-h6pl3s2f/pycrypto/

最佳答案

那没有用,但我确实在文章中找到了答案。
我运行了“yum -y install python3-devel”,这解决了我的问题。然后我就可以安装pycrypto了。

关于python - 在 python3.6 上安装 pycrypto,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63142611/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com