Bioconda as a channel depends on Conda Forge and so specifying bioconda as the only channel is incorrect. Instead, a proper specification for using the bioconda channel is
name: freebayes
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- freebayes=1.3.6
See the channel configuration in the Usage section.
Answer from merv on Stack OverflowBioconda as a channel depends on Conda Forge and so specifying bioconda as the only channel is incorrect. Instead, a proper specification for using the bioconda channel is
name: freebayes
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- freebayes=1.3.6
See the channel configuration in the Usage section.
If this helps, I can recreate the issue with:
conda config --set channel_priority strict
mamba env create --file freebayes.yaml
...
Looking for: ['freebayes=1.3.6']
Encountered problems while solving:
- package freebayes-1.3.6-h346b5cb_1 requires htslib >=1.14,<1.15.0a0, but none of the providers can be installed
I can fix it by setting:
conda config --set channel_priority flexible
mamba env create ... # Ok now
Once done, you may want to reset it:
conda config --set channel_priority strict
since at the time of this writing bioconda recommends strict priority.
Installation Issue: MOOSE Installation Fails on Linux Ubuntu 22.04.3 as libgcc-ng >=12 does not exist
Installing from scratch is failing due to Conda
Weird conflict errors
python - Package conflict with anaconda - Stack Overflow
TLDR
conda create -n beast -c conda-forge -c bioconda python=3.7 beast2
Longer version
By telling conda that it can visit conda-forge, it has some extra options to resolve the dependency conflicts. However, that doesn't really explain why this happens:
$ conda create -n beast python=3.7 libgcc-ng=7.3 libstdcxx-ng=7.3
$ activate beast
$ conda install -c bioconda beast2
Package libstdcxx-ng conflicts for:
python=3.7 -> libstdcxx-ng[version='>=7.2.0|>=7.3.0']
beast2 -> beagle-lib -> libstdcxx-ng[version='>=7.3.0|>=7.5.0']
It isn't clear why these dependencies aren't satisfied, since we already installed libstdcxx-ng version 7.3.
Alternative
If you instead use mamba to make the environment, you get slightly more helpful feedback:
$ conda install mamba
$ mamba create -n beast-mamba python=3.7 beast2
...
Problem: nothing provides requested beast2
...
$ mamba create -n beast-mamba -c bioconda python=3.7 beast2
...
Encountered problems while solving.
Problem: nothing provides openjdk 8.0* zulu8* needed by beast2-2.4.5-0
...
$ mamba create -n beast-mamba -c bioconda -c conda-forge python=3.7 beast2
...
Success
You can tell conda to search packages in coda-forge like this:
conda config --append channels conda-forge
libgcc-ng, libstdcxx-ng do exist in conda-forge. But they're for Linux only, not for macOS, Windows.
- conda-forge/libgcc-ng
- conda-forge/libstdcxx-ng
These two packages include libraries for gcc. For macOS, install gcc with homebrew. They are contained by the gcc package already.
brew install gcc
As @Simba correctly points out those packages are for linux-* platforms only. If your goal is simply to have a C/C++ compiler (not specifically GCC), consider instead using
conda install -c conda-forge compilers
This will install a platform-appropriate compiler on each platform, and populates the environment variables CC, CXX and GFORTRAN with paths to the respective compilers.