Conda 认为包规范不兼容,即使它们不是

Conda thinks package specifications are incompatible, even though they are not

运行命令:

 conda create -y --name test -c bioconda glimmer=3.02 blast=2.9.0 trnascan-se=2.0.6 hhsuite

产生了以下错误输出:

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 each other:

Output in format: Requested package -> Available versions

Package perl conflicts for:
blast=2.9.0 -> perl[version='>=5.26.2,<5.26.3.0a0']
hhsuite -> perl[version='>=5.26.2,<5.26.3.0a0']
trnascan-se=2.0.6 -> perl[version='>=5.26.2,<5.26.3.0a0']
blast=2.9.0 -> entrez-direct -> perl[version='5.22.0.*|>=5.26.0,<5.27.0a0|>=5.26.2,<5.27.0a0']

Package libcxx conflicts for:
blast=2.9.0 -> pcre[version='>=8.44,<9.0a0'] -> libcxx[version='>=10.0.0']
blast=2.9.0 -> libcxx[version='>=4.0.1|>=9.0.1']

Package libcxxabi conflicts for:
blast=2.9.0 -> libcxx[version='>=4.0.1'] -> libcxxabi==4.0.1[build='hebd6815_0|hcfea43d_1']
hhsuite -> libcxx[version='>=4.0.1'] -> libcxxabi==4.0.1[build='hebd6815_0|hcfea43d_1']

从输出来看,none 个包的依赖关系似乎相互冲突。我如何创建这个环境?

Bioconda 通道规范

无法解决可能是由于具有非标准通道规范造成的。1 The official recommendation for Bioconda是使用:

channels:
  - conda-forge
  - bioconda
  - defaults

strict priority。我可以使用以下 YAML2

毫无问题地解决

foo.yaml

name: foo
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
  - glimmer=3.02 
  - blast=2.9.0 
  - trnascan-se=2.0.6 
  - hhsuite

然后

conda env create -n foo -f foo.yaml

但是,如果我不包含 conda-forge 频道,我会遇到与 OP 类似的错误。

没有定论,但值得一试。


[1] 至于包冲突报告输出没有帮助:不幸的是,这已经有一段时间了。

[2] 考虑使用 YAML 而不是 shell 单行代码,尤其是在科学背景下。它产生了如何指定环境的清单工件,然后可以对其进行版本控制。