src/gevent/libev/corecext.c:95:20:致命错误:Python.h错误:command';gcc&x27;失败,退出状态为1
在我的CentOS 7.7中,我安装了python3src/gevent/libev/corecext.c:95:20:致命错误:Python.h错误:command';gcc&x27;失败,退出状态为1,python,pip,Python,Pip,在我的CentOS 7.7中,我安装了python3yum安装python3,我想通过pip3安装gevent,但出现以下错误: src/gevent/libev/corecext.c:95:20: Fatal error:Python.h:there is no that directory or file #include "Python.h" ^ Compilation interrupt
yum安装python3
,我想通过pip3安装gevent
,但出现以下错误:
src/gevent/libev/corecext.c:95:20: Fatal error:Python.h:there is no that directory or file
#include "Python.h"
^
Compilation interrupt
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9sbqi31b/gevent/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-zgsgc2dj-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9sbqi31b/gevent/
我找到谷歌,让我安装python-dev
,但是在我安装之后,仍然存在这个错误
更新: 我的pip3版本是
9.0.3
# pip3 --version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
你的pip版本低,你应该更新它 按命令:
sudo pip3 install pip --upgrade
您的pip版本是什么?
sudo-yum-install-python3-devel