Search code examples
anacondacondaminiconda

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


Running the command:

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

Produced the following error output:

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']

From the output, none of the packages' dependencies seem to be in conflict with each other. How do I create this environment?


Solution

  • Bioconda Channel Specification

    The inability to solve could be caused by having a nonstandard channel specification.1 The official recommendation for Bioconda is to use:

    channels:
      - conda-forge
      - bioconda
      - defaults
    

    with strict priority. I can solve without issue using the following YAML2

    foo.yaml

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

    then

    conda env create -n foo -f foo.yaml
    

    However, if I don't include the conda-forge channel, I get a similar error as with OP.

    Not conclusive, but worth a try.


    [1] As for the package conflict report output not being helpful: unfortunately, this has been a problem for a while now.

    [2] Consider using YAMLs instead of shell one-liners, especially in a scientific context. It yields a manifest artifact of how an environment was specified, and this can then be version controlled.