Trying to install Roary with Conda results in error message
Entering edit mode
10 weeks ago
tobiwan ▴ 10

Hello everyone, I'm trying to install Roary in a Conda environment but I'm getting the following error message:

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

  - feature:/linux-64::__glibc==2.35=0
  - roary -> libgcc-ng[version='>=7.3.0'] -> __glibc[version='>=2.17']

Your installed version is: 2.35

While looking the error up, I read that using Mamba results in a more precise error message, so I tried it also this way:

Encountered problems while solving:
  - package perl-capture-tiny-0.48-pl5321ha770c72_1 requires perl >=5.32.1,<5.33.0a0 *_perl5, but none of the providers can be installed

Does anyone know how I can fix this? Sorry if it's a trivial question, I'm still a beginner in this field

Thank you for your help!

Edit: I'm using Ubuntu 22.04.2 LTS, command line used: conda install roary

conda mamba

roary conda • 974 views
Entering edit mode
10 weeks ago
Dunois ★ 2.3k

Did you also try mamba install --no-channel-priority -c bioconda roary?

Also, what else is installed in the roary environment that appears to be active in your screenshot? Is it empty?

Entering edit mode

Your command worked perfectly. Thank you so much! Could you explain what the issue was?

And yes, the roary environment is empty. I created it because at first I thought that maybe other packages in the other environment are causing the error.

Entering edit mode

The issue is that a package installed via conda has dependencies (i.e., other packages it depends upon), and these need not all be maintained by the same developer(s). Say the user wishes to install version 1.0 of pkgA which depends upon version 2.0 of pkgB maintained by another party.

Conda channels are essentially repositories of packages that conda can call upon to download packages (and their dependencies from). What versions of a package are available in a particular channel varies.

Sometimes, what happens is although channel1 has both pkgA and pkgB the version of pkgB that is available may be incompatible with pkgA's requirements (e.g., v2.1 instead of v2.0 because the developer of pkgB updated it in this channel only).

If channel priority during package installation is set to "strict" (the default), conda will attempt to satisfy all dependencies from the channel indicated to have the highest priority and will simply fail if these dependencies cannot be satisfied.

On the other hand, if channel priority is relaxed (e.g., by setting --no-channel-priority) conda will attempt to examine lower priority channels also to resolve dependency issues and will not fail immediately if the highest priority channel alone is insufficient for this purpose. In our example's case, if channel1 (with the highest priority) does not have the v2.0 of pkgB that is needed by pkgA, conda will then search the channel with the next highest priority (say channel2) to see if that channel has v2.0 of pkgB (and if it is available, it will install it).

In this way, relaxing channel priority during installation can help elevate the probability of a successful installation. The trade off is, of course, speed of installation since conda will have to search many more channels.

This is essentially what happened during your attempt to install roary insofar I can ascertain. It appears your conda installation has channel priority set to "strict" by default, and it was unable to find a version of perl that lay between versions 5.32.1 and 5.33.0a0 (perl >=5.32.1,<5.33.0a0 in your screenshot) in the highest priority channel, so it aborted the installation. This is what the final message in the screenshot alludes to (The environment can't be solved, aborting the operation). With the strict channel prioritization eliminated (by supplying --no-channel-priority) the problem was resolved as some other channel was able to supply a version of perl that satisfied the requirements indicated above without breaking something else somewhere else in the dependency graph.

You can check your current conda channel priority with:

conda config --show channel_priority

And it can be set like so (for example):

conda config --set channel_priority flexible

You can also inspect currently active channels with:

conda config --show channels

(They are listed in decreasing order of priority.)

Please also see:

Note: I am unsure what led to the warning libmamba unable to .... messages being produced.

Entering edit mode

Wow, thank you so much for your explanation!

My conda channel is indeed set to strict priority. Should packages with different dependencies, like roary in my example, be installed in separate environments so there are no problems with, in your example, pkgB version 2.0 and 2.1 or are packages able to specifically use the version needed for them if multiple are available? (for example pkgA using pkbB 2.0 without problems if pkbB 2.1 is also installed in the same environment)

Entering edit mode

You are welcome.

And yes, based on my own limited experience, I would always recommend that these various bioinformatics tools be installed into their own separate environments whenever possible. Please also try and not install anything (except "global" utilities like mamba) into the base environment (see

Entering edit mode

+1 Great answer!


Login before adding your answer.

Traffic: 1007 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6