【问题标题】:Cannot install datascience with python 2.7 - ValueError: This package requires python >= 3.0 [duplicate]无法使用 python 2.7 安装数据科学-ValueError:此包需要 python >= 3.0 [重复]
【发布时间】:2020-08-07 16:11:42
【问题描述】:

我的环境不允许我安装数据科学,因为它不再适用于 python 2.7。 (一周前工作正常)。

我犯了一个错误,卸载 anaconda 并重新安装它以解决绘图问题。看来我的计划适得其反。

任何人都可以建议如何访问和安装以前版本的数据科学(scipy?),以便我可以完成我的任务?

错误信息如下。

(env1) C:\Users\WeeP>pip install datascience
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. 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 datascience
  Using cached https://files.pythonhosted.org/packages/d0/b4/df6f7fcf6c4ab4858c46e629769729af634e32455f84d8d3fafd8f4c90fa/datascience-0.15.6.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\GrantP\anaconda3\envs\env1\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'c:\\users\\grantp\\appdata\\local\\temp\\pip-install-_ir4yh\\datascience\\setup.py'"'"'; __file__='"'"'c:\\users\\grantp\\appdata\\local\\temp\\pip-install-_ir4yh\\datascience\\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 'c:\users\grantp\appdata\local\temp\pip-install-_ir4yh\datascience\pip-egg-info'
         cwd: c:\users\grantp\appdata\local\temp\pip-install-_ir4yh\datascience\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\grantp\appdata\local\temp\pip-install-_ir4yh\datascience\setup.py", line 7, in <module>
        raise ValueError('This package requires python >= 3.0')
    ValueError: This package requires python >= 3.0
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

【问题讨论】:

    标签: python-2.7 anaconda data-science


    【解决方案1】:

    Python 中的某些包是使用特定版本的 Python 开发的。如果您想使用该包,您必须至少具有用于开发该包的 Python 版本。

    您的问题也有同样的情况。将 Python 2.7 至少更新到 Python 3.0,因为 datascience 包至少需要 Python 3.0。这可以解决你的问题。

    不要使用已弃用的包或 Python 版本

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-22
      • 2017-03-26
      • 2014-07-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-10-31
      • 1970-01-01
      相关资源
      最近更新 更多