安装scipy时出现ERROR: Command errored out with exit status 1:的解决方案

问题描述

pip install scipy

使用pip安装numpy没有问题,但安装pandas时出现如下问题。尝试过通过升级setuptools,无果。

ERROR: Command errored out with exit status 1:
 command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-IWfYMk/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-IWfYMk/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: /tmp/pip-install-IWfYMk/pandas/
Complete output (8 lines):
Traceback (most recent call last):
  File "", line 1, in 
  File "/tmp/pip-install-IWfYMk/pandas/setup.py", line 21, in 
    import versioneer
  File "versioneer.py", line 1629
    print("Adding sample versioneer config to setup.cfg", file=sys.stderr)
                                                              ^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

解决方案

安装pip3,然后用pip3进行pandas和scipy等软件的安装

    > sudo apt-get install python3-pip
    > pip3 install pandas
    > pip3 install scipy
    

你可能感兴趣的:(机器学习,安装异常处理)