提问者:小点点

Python-命令"pythonsetup.pyegg_info"失败,错误代码1在 /tmp/pip-build-21ft0H/pandas


我正在使用Centos 7和Python2.7.5。问题是当我安装熊猫时,我收到了这个错误消息

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

我已经尝试了很多解决方案,但没有成功,甚至yum-y update

  • 由于egg_info错误,无法通过pip安装
  • Pythonpip安装失败:无效命令egg_info
  • https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4
  • pip无法安装任何东西,错误:无效命令'egg_info'

共3个答案

匿名用户

分发已从0.7版合并到Setuptools中。如果您使用的是版本

匿名用户

我已经找到了答案。我需要通过每1k展现的收入安装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

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

匿名用户

在我的情况下,连续集成工作:

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