简体   繁体   English

Python - 命令“python setup.py egg_info”在 /tmp/pip-build-21ft0H/pandas 中失败,错误代码为 1

[英]Python - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-21ft0H/pandas

I'm using Centos 7 and Python 2.7.5.我正在使用 Centos 7 和 Python 2.7.5。 The problem is when I install Pandas, i got this error message问题是当我安装 Pandas 时,我收到此错误消息

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 .我已经尝试了很多解决方案,但即使yum -y update也没有成功。

Distribute has been merged into Setuptools as of version 0.7.自 0.7 版起,Distribute 已合并到 Setuptools 中。 If you are using a version <=0.6, upgrade using pip install --upgrade setuptools or easy_install -U setuptools .如果您使用的是 <=0.6 版本,请使用pip install --upgrade setuptoolseasy_install -U setuptools

I already found the answer.我已经找到了答案。 I need to install python via RPM.我需要通过 RPM 安装 python。

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/参考: 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
pip install -- upgrade pip python -m pip install pandas

following link solved my problem以下链接解决了我的问题

https://googleapis/google-cloud-python#3884 https://googleapis/google-cloud-python#3884

You should try pip install --upgrade setuptools.您应该尝试 pip install --upgrade setuptools。

sudo apt-get install python-matplotlib须藤 apt-get 安装 python-matplotlib

i used this when i got similar error during matplotlib install我在 matplotlib 安装过程中遇到类似错误时使用了这个

simply execute this command :只需执行此命令:

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

I got this error while installing mysqlclient from pip3从 pip3 安装 mysqlclient 时出现此错误

So I executed command :所以我执行了命令:

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

After executing this command i was able to install mysqlclient successfully执行此命令后,我能够成功安装 mysqlclient

Note:- Version Number 3.6 is to be replaced by your python version注意:- 版本号 3.6 将替换为您的 python 版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 命令“python setup.py egg_info”在 /tmp/pip-build-tu6ygqzj/mysql-python/ 中失败,错误代码为 1 - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-tu6ygqzj/mysql-python/ 无法安装Django:命令“python setup.py egg_info”失败,错误代码1在/ tmp / pip-build-rcF9a5 / Django / - Trouble installing Django: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-rcF9a5/Django/ 命令“ python setup.py egg_info”在/ tmp / pip-build-hg0dbjgz / mysqlclient /中失败,错误代码为1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-hg0dbjgz/mysqlclient/ 命令“python setup.py egg_info”在 /tmp/pip-build-dlih6aks/MarkupSafe/ 中失败,错误代码为 1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-dlih6aks/MarkupSafe/ InstallationError:/ tmp / pip-build-Jr1szu / Django /中的命令“ python setup.py egg_info”失败,错误代码为1 - InstallationError: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-Jr1szu/Django/ ctcdecode 安装失败 - 命令“python setup.py egg_info”在 /tmp/pip-req-build-7zcjual1/ 中失败,错误代码为 1 - ctcdecode install fail - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-7zcjual1/ 命令“python setup.py egg_info”在 /tmp/pip-build-hn4hol_z/spacy/ 中失败,错误代码为 1 - Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hn4hol_z/spacy/ 命令“python setup.py egg_info”失败,/tmp/pip-build-e7AmlG/django-filter 中的错误代码为 1 - Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-e7AmlG/django-filter 命令“ python setup.py egg_info”在c:\\ temp \\ pip-build-9s6c_h \\ pyenchant \\中失败,错误代码为1 - Command “python setup.py egg_info” failed with error code 1 in c:\temp\pip-build-9s6c_h\pyenchant\ 配置返回的代码256 - python setup.py egg_info失败,错误代码为1 / tmp / pip_build_root / lxml - configure returned code 256 - python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/lxml
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM