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
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.
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 ofpkgA
which depends upon version 2.0 ofpkgB
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 bothpkgA
andpkgB
the version ofpkgB
that is available may be incompatible withpkgA
's requirements (e.g., v2.1 instead of v2.0 because the developer ofpkgB
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, ifchannel1
(with the highest priority) does not have the v2.0 ofpkgB
that is needed bypkgA
,conda
will then search the channel with the next highest priority (saychannel2
) to see if that channel has v2.0 ofpkgB
(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 yourconda
installation has channel priority set to "strict" by default, and it was unable to find a version ofperl
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 ofperl
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:And it can be set like so (for example):
You can also inspect currently active channels with:
(They are listed in decreasing order of priority.)
Please also see: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html.
Note: I am unsure what led to the
warning libmamba unable to ....
messages being produced.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)
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 thebase
environment (see https://stackoverflow.com/q/57243296).+1 Great answer!