python2 安装pandas提示错误:
Collecting pandas Downloading http://mirrors.cloud.aliyuncs.com/pypi/packages/07/cf/1b6917426a9a16fd79d56385d0d907f344188558337d6b81196792f857e9/pandas-0.25.1.tar.gz (12.6MB) |████████████████████████████████| 12.6MB 11.4MB/s ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bvdeLW/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bvdeLW/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-bvdeLW/pandas/ Complete output (8 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-bvdeLW/pandas/setup.py", line 21, in <module> 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.
解决方法:
这是因为python2无法安装最新的pandas,只需要安装以前的版本
pip install pandas==0.22.0