首页 > 解决方案 > 在 Conda 上安装 multiqc 会产生“UnsatisfiableError:”

问题描述

我尝试安装一个名为 multiqc 的程序,当我尝试在我的 conda 环境中安装它时它会引发此错误,我尝试安装列表中包含的 python 的替代版本,但它似乎无法正常工作。

命令

conda install -c bioconda multiqc

安装

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
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:

  - multiqc -> python[version='2.7.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|3.4.*']

Your python: python=3.7

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.

标签: pythonunixconda

解决方案


安装 MultiQC 的命令不应使用-c bioconda. 相反,根据bioconda 文档设置 conda 通道并在没有-c标志的情况下安装:

# Only need to do this once
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge

# Install MultiQC
conda install multiqc

如果您愿意,也可以从 PyPI 或多个其他来源安装:https ://multiqc.info/docs/#installing-multiqc

在撰写本文时,MultiQC 工作并在 Python 3.6-3.9 上进行了测试。3.7 肯定可以工作,所以这不是问题。


推荐阅读