pip install pandas报错如下信息: ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
网上有建议是如下两天命令解决: python -m pip install --upgrade pip python -m pip install --upgrade setuptools 然后再重新安装: pip install pandas
显示如下: ~]# python -m pip install --upgrade pip DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already up-to-date: pip in /usr/local/lib/python2.7/site-packages (20.0.2)
~]# python -m pip install --upgrade setuptools DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already up-to-date: setuptools in /usr/local/lib/python2.7/site-packages (44.1.0) ~]# pip install pandas DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting pandas Using cached pandas-0.24.2.tar.gz (11.8 MB) Requirement already satisfied: python-dateutil>=2.5.0 in /usr/local/lib/python2.7/site-packages (from pandas) (2.8.0) Collecting pytz>=2011k Downloading pytz-2019.3-py2.py3-none-any.whl (509 kB) |████████████████████████████████| 509 kB 41 kB/s Collecting numpy>=1.12.0 Using cached numpy-1.16.6-cp27-cp27m-manylinux1_x86_64.whl (17.0 MB) Requirement already satisfied: six>=1.5 in /usr/local/lib/python2.7/site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0) Building wheels for collected packages: pandas Building wheel for pandas (setup.py) ... done Created wheel for pandas: filename=pandas-0.24.2-cp27-cp27m-linux_x86_64.whl size=27513599 sha256=bc5e89999a348bb6b6a2e46096912532978caeaff1d9e93d647830d575908fc6 Stored in directory: /root/.cache/pip/wheels/5f/b4/0b/b1670f56250abdd8f7f200c1a63fbb96e2132f2ed7ee1f8b71 Successfully built pandas Installing collected packages: pytz, numpy, pandas Successfully installed numpy-1.16.6 pandas-0.24.2 pytz-2019.3
如上完美解决