conda create env using .yml file leads to dependency conflicts

Hi all,

I’m trying to create a conda environment through a .yml file that has all the required dependencies for a certain project but I run into environment conflicts. I figured out the source of this conflict, which stems from two specific dependencies, but for some reason, creating an environment with these dependencies alone doesn’t lead to an error, but does when I run it with all the other dependencies.

Here’s what I mean:

This is my .yml file for the environment I want to create.

name: master
channels:
  - r
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - bedtools=2.30.0
  - htseq=2.0.2
  - samtools=1.16.1
  - r-base=4.2.2
  - r-dplyr=1.0.10
  - r-ggplot2=3.4.0
  - r-ggridges=0.5.4
  - r-biocmanager=1.30.19
  - bioconductor-rsamtools=2.14.0
  - bioconductor-rsubread=2.8.1
  - bioconductor-deseq2=1.38.0
  - bioconductor-biocgenerics=0.44.0
  - bioconductor-genomicalignments=1.34.0
  - bioconductor-genomicranges=1.50.0

After running the code conda env create -f .yml it leads to an error basically stating

Found conflicts! Looking for incompatible packages.

The packages that I’ve determined are the issue are samtools and rsubread. When I run a subset of the .yml file without them, it works. When I run a .yml file with only samtools and rsubread, that also works. So I don’t know why its creating a conflict. Both of the .yml files below work.

name: testingenv1
channels:
  - r
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - bedtools=2.30.0
  - htseq=2.0.2
  - r-base=4.2.2
  - r-dplyr=1.0.10
  - r-ggplot2=3.4.0
  - r-ggridges=0.5.4
  - r-biocmanager=1.30.19
  - bioconductor-rsamtools=2.14.0
  - bioconductor-deseq2=1.38.0
  - bioconductor-biocgenerics=0.44.0
  - bioconductor-genomicalignments=1.34.0
  - bioconductor-genomicranges=1.50.0
name: testingenv2
channels:
  - r
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - samtools=1.16.1
  - bioconductor-rsubread=2.8.1

I’ve tried searching the web for my own solution to no avail. I’ve even tried package clients like mamba instead of conda since I’ve heard that conda’s error reporting is pretty bad, but mamba leads to other issues.

Any help would be appreciated!

Read more here: Source link