The Python Oracle

error: command 'gcc' failed with exit status 1 while installing eventlet

--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Melt

--

Chapters
00:00 Error: Command 'Gcc' Failed With Exit Status 1 While Installing Eventlet
00:49 Accepted Answer Score 416
01:23 Answer 2 Score 59
01:35 Answer 3 Score 35
02:02 Answer 4 Score 43
02:11 Thank you

--

Full question
https://stackoverflow.com/questions/1109...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #ubuntu #eventlet

#avk47



ACCEPTED ANSWER

Score 416


Your install is failing because you don't have the python development headers installed.

First update the packages with sudo apt update.

You can do this through apt on ubuntu/debian with:

sudo apt-get install python-dev 

for python3 use:

sudo apt-get install python3-dev

For eventlet you might also need the libevent libraries installed so if you get an error talking about that you can install libevent with:

sudo apt-get install libevent-dev



ANSWER 2

Score 59


For Fedora:

sudo yum install python-devel

sudo yum install libevent-devel

and finally:

sudo easy_install gevent



ANSWER 3

Score 43


What worked for me on CentOS was:

sudo yum -y install gcc
sudo yum install python-devel



ANSWER 4

Score 35


For Redhat Versions(Centos 7) Use the below command to install Python Development Package

Python 2.7

sudo yum install python-dev
or
sudo yum install python-devel

Python 3.4

sudo yum install python34-devel

Python 3.6

sudo yum install python36-devel

If the issue is still not resolved then try installing the below packages -

sudo yum install python-devel

sudo yum install openssl-devel

sudo yum install libffi-devel