I'm using Centos 7 and Python 2.7.5. The problem is when I install Pandas, i got 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 already tried a lot of solutions but no success even yum -y update
.
Distribute has been merged into Setuptools as of version 0.7. If you are using a version <=0.6, upgrade using pip install --upgrade setuptools
or easy_install -U setuptools
.
I 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
Reference: http://blog.revivalx.com/2015/11/14/python-command-python-setup-py-egg_info-failed-with-error-code-1-tmppip-build-21ft0hpandas/
In my case for continuos 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With