0

In my CentOS 7.7, I installed python3 yum install python3 and I want to install the gevent by pip3, but get below error:

    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/

I found google, let me install the python-dev, but after I installed it, there still exist this error.


Update: My pip3 version is 9.0.3.

# pip3 --version
pip 9.0.3 from /usr/lib/python3.6/site-packages (python 3.6)
2
  • What's the version of your pip? Commented Oct 16, 2020 at 3:08
  • sudo yum install python3-devel Commented Oct 17, 2020 at 12:50

1 Answer 1

2

your pip version is low, you should update it.

by command:

sudo pip3 install pip --upgrade
Sign up to request clarification or add additional context in comments.

1 Comment

Updating pip and python dev package fixed my issue. sudo pip3 install pip --upgrade && sudo yum install python3.x-level

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.