无法在 Python3.6 上安装 pandas=0.18.1
Unable to install pandas=0.18.1 on Python3.6
我正在尝试使用 python 3.6.13 作为约束设置遗留项目。虽然我 运行 在尝试安装 pandas 版本 0.18.1
时遇到了问题
日志如下:
Collecting numpy==1.11.1 (from -r requirements-remote.txt (line 25))
Using cached https://files.pythonhosted.org/packages/e0/4c/515d7c4ac424ff38cc919f7099bf293dd064ba9a600e1e3835b3edefdb18/numpy-1.11.1.tar.gz
Collecting pandas==0.18.1 (from -r requirements-remote.txt (line 26))
Using cached https://files.pythonhosted.org/packages/11/09/e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/pandas-0.18.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/var/folders/zc/tjmjl2890y57f30n1yg7dg39xl_6k6/T/easy_install-zcqg452m/numpy-1.21.0rc2/setup.py", line 34, in <module>
_CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
RuntimeError: Python version >= 3.7 required.
错误非常明显:Python version >= 3.7 required
。根据您使用的路径 3.6
(即从 2016 年开始,将在年底达到生命周期结束)。
这似乎是因为 pandas 正在尝试将 numpy-1.21.0rc2
安装为依赖项,请参阅回溯(强调我的):
File "/var/folders/zc/tjmjl2890y57f30n1yg7dg39xl_6k6/T/easy_install-zcqg452m/numpy-1.21.0rc2/setup.py", line 34, in
我不确定为什么 pandas 这样做,但是如果您首先从需求文件中安装 numpy,pandas 可能会认为该依赖关系已解决。
pip install numpy==1.11.1
pip install -r requirements-remote.txt
顺便说一下,numpy 1.11.1 nor pandas 0.18.1 都没有将 python 3.6 列为受支持的 python 版本,它们最多只有 3.5。它可能仍然有效,但也可能由于 python 3.6 太新 而失败(我无法对此进行测试 - 抱歉)。您可以尝试将这些依赖项刷新到仍然支持 python 3.6:
的最高版本
我正在尝试使用 python 3.6.13 作为约束设置遗留项目。虽然我 运行 在尝试安装 pandas 版本 0.18.1
时遇到了问题日志如下:
Collecting numpy==1.11.1 (from -r requirements-remote.txt (line 25))
Using cached https://files.pythonhosted.org/packages/e0/4c/515d7c4ac424ff38cc919f7099bf293dd064ba9a600e1e3835b3edefdb18/numpy-1.11.1.tar.gz
Collecting pandas==0.18.1 (from -r requirements-remote.txt (line 26))
Using cached https://files.pythonhosted.org/packages/11/09/e66eb844daba8680ddff26335d5b4fead77f60f957678243549a8dd4830d/pandas-0.18.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/Users/qqqqq/.pyenv/versions/3.6.13/envs/pyenv36/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/var/folders/zc/tjmjl2890y57f30n1yg7dg39xl_6k6/T/easy_install-zcqg452m/numpy-1.21.0rc2/setup.py", line 34, in <module>
_CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver)
RuntimeError: Python version >= 3.7 required.
错误非常明显:Python version >= 3.7 required
。根据您使用的路径 3.6
(即从 2016 年开始,将在年底达到生命周期结束)。
这似乎是因为 pandas 正在尝试将 numpy-1.21.0rc2
安装为依赖项,请参阅回溯(强调我的):
File "/var/folders/zc/tjmjl2890y57f30n1yg7dg39xl_6k6/T/easy_install-zcqg452m/numpy-1.21.0rc2/setup.py", line 34, in
我不确定为什么 pandas 这样做,但是如果您首先从需求文件中安装 numpy,pandas 可能会认为该依赖关系已解决。
pip install numpy==1.11.1
pip install -r requirements-remote.txt
顺便说一下,numpy 1.11.1 nor pandas 0.18.1 都没有将 python 3.6 列为受支持的 python 版本,它们最多只有 3.5。它可能仍然有效,但也可能由于 python 3.6 太新 而失败(我无法对此进行测试 - 抱歉)。您可以尝试将这些依赖项刷新到仍然支持 python 3.6:
的最高版本