Unable to install htslib v1.12 with conda

867 Views Asked by At

I could not install htslib v1.12 with conda using either commands:

conda install -c bioconda htslib
conda install -c bioconda/label/broken htslib

Using conda install -c bioconda/label/cf201901 htslib gave me htslib v1.9.

Does anyone know how to install v1.12 with conda? Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

The directives OP reference are from Anaconda Cloud, which are generic and miss the nuances that using specialized channels often entails. Specifically, Bioconda expects the following channel prioritization:

channels:
  - conda-forge
  - bioconda
  - defaults

This is the order Bioconda uses when building and testing packages. Not following this can lead to undefined behavior.

Best practice is to either set this globally - great if you primarily work with bioinformatics software - or set it in an env-specific way (i.e., use conda config --env).

Otherwise, to mimic this channel priority manually one would use

conda install --override-channels -c conda-forge -c bioconda -c defaults htslib=1.12

but most of the time one can get away with

conda install -c conda-forge -c bioconda htslib=1.12