【问题标题】:How to fix "UnsatisfiableError: The following specifications were found to be incompatible with each other: - pip -> python=3.6"如何修复“UnsatisfiableError:发现以下规范相互不兼容:-pip -> python=3.6”
【发布时间】:2019-07-04 23:38:40
【问题描述】:

所以,我尝试使用命令 ecmwf api client conda install -c conda-forge ecmwf-api-client 进行安装,然后出现标题中的警告。不知道怎么处理

(基础)C:\Users\caina>conda install -c conda-forge ecmwf-api-client Collecting package metadata (current_repodata.json): done Solving environment: failed Collecting package metadata (repodata.json): done Solving environment: failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

  • pip -> python=3.6

【问题讨论】:

    标签: python anaconda conda


    【解决方案1】:

    安装到新环境而不是 conda 基础环境。最近的 Anaconda 和 Miniconda 安装程序在基本环境中安装了 Python 3.7,但您尝试安装的东西需要 Python 3.6。

    【讨论】:

      【解决方案2】:
      1. 只需转到 Anaconda 导航器。
      2. 转到环境,选择已安装(包等),然后单击 Python 的版本。将其降级为较低版本。在你的情况下,Python 3.6

      【讨论】:

        【解决方案3】:

        正如其他人所说,建议创建一个新的、干净的环境并将 conda 安装到其中。

        这可以通过以下方式完成:

        # Create new environment
        conda create --name <name> python=3.6
        # Activate new environment
        conda activate <name>
        # Install packages into new environment
        conda install -c conda-forge ecmwf-api-client
        

        为不同的项目保留不同的环境是个好主意。然后您可以使用conda deactivate/conda activate &lt;name&gt; 并将任何软件包安装到正确的环境中。这也让您可以轻松地在不同版本的 python 或单个软件包之间进行切换。

        【讨论】:

          【解决方案4】:

          不知道你是否设法解决了这个问题,但如果其他人被困在这里,我找到的解决方案是:

          只是简单地在 conda env 中使用了 pip3。它已经为python3.6安装了opencv,没有任何问题:

          pip3 install opencv-python
          

          【讨论】:

            猜你喜欢
            • 2020-01-10
            • 2018-03-14
            • 1970-01-01
            • 2019-07-03
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            相关资源
            最近更新 更多