【问题标题】:'UnsatisfiableError' while trying to install scikit-learn尝试安装 scikit-learn 时出现“UnsatisfiableError”
【发布时间】:2021-02-01 05:02:45
【问题描述】:

我需要 sklearn,这就是为什么我尝试使用 conda install scikit-learn 在我的 conda 环境中安装 scikit-learn,但结果是:

Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: \ 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                            

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - scikit-learn -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0|>=3.5,<3.6.0a0']

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your system:

  - feature:/linux-64::__cuda==9.1=0
  - feature:|@/linux-64::__cuda==9.1=0

Your installed version is: 9.1

如果我尝试conda install -c anaconda scikit-learn 或conda install -c conda-forge scikit-learn,也会出现同样的情况。如何解决?

【问题讨论】:

    标签: scikit-learn conda sklearn-pandas


    【解决方案1】:

    好的,所以问题是我的环境运行的是 Python 3.9.0 但scikit-learn 与 3.9 不兼容,所以我创建了一个新环境,同时特别提到了 Python 版本 conda create -n newEnv python=3.7.3 python 3.7.3 在我的基础环境中运行,所以我选择了它。

    【讨论】:

      【解决方案2】:

      我刚遇到这个问题,我的操作系统是Windows10。起初我试图卸载 scikit-learn 包并重新安装它,但它失败了。然后我搜索了这个website,它专注于使用wheel的python包。幸运的是,兼容 python3.9.0 的 scikit-learn 现在可用。下载正确的轮子文件后,i CD进入下载文件夹并使用'PIP安装轮文件名 em >>'安装它。它适用于我的情况。祝福你。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-02-24
        • 2017-08-19
        相关资源
        最近更新 更多