Python - python setup.py egg_info command failed with error code 1 in / tmp / pip-build-21ft0H / pandas

I am using Centos 7 and Python 2.7.5. The problem is that when I install Pandas, I received this error message

SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-21ft0H/pandas 

I have already tried many solutions, but did not even have time to yum -y update .

+6
source share
7 answers

I have already found the answer. I need to install python via RPM.

 rpm -i ftp://195.220.108.108/linux/centos/7.1.1503/updates/x86_64/Packages/python-2.7.5-18.el7_1.1.x86_64.rpm 

Link: http://blog.revivalx.com/2015/11/14/python-command-python-setup-py-egg_info-failed-with-error-code-1-tmppip-build-21ft0hpandas/

+2
source

Distribution has been integrated in Setuptools since version 0.7. If you are using version <= 0.6, upgrade using pip install --upgrade setuptools or easy_install -U setuptools .

+1
source

the following link solved my problem

https: // googleapis / google python cloud # 3884

You should try pip install --upgrade setuptools.

0
source

sudo apt-get install python-matplotlib

i used this when i got a similar error during matplotlib installation

0
source

just run this command:

sudo apt-get install python3.6-dev libmysqlclient-dev

0
source

In my case, for continuous integration work:

 before_script: - apk update && apk add python3-dev - apk add --no-cache python3-dev libstdc++ - apk add --update curl gcc g++ - ln -s /usr/include/locale.h /usr/include/xlocale.h - pip3 install numpy - pip3 install pandas - rm -rf /var/cache/apk/* - python -V - python -m pip install --upgrade pip - python -m pip install --upgrade pip setuptools wheel --user --no-cache-dir 
0
source

I got this error when installing mysqlclient from pip3

So, I ran the command:

sudo apt-get install python3.6-dev libmysqlclient-dev

After executing this command, I was able to successfully install mysqlclient

Note: - Version number 3.6 should be replaced by your version of Python.

0
source

All Articles