3
$\begingroup$

I searched for the package 'snakemake' on my SLURM cluster using:

conda search --channel bioconda snakemake

and I get many versions, up to 5.4.2.

I then try to install it using:

conda install --channel bioconda --yes snakemake=5.4.2

but it fails with the following message:

PackagesNotFoundError: The following packages are not available from current channels:

  - snakemake

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch
  - https://repo.anaconda.com/pkgs/pro/linux-64
  - https://repo.anaconda.com/pkgs/pro/noarch

Why?

Why is the bioconda channel not included in the current channels? I thought that was what the --channel bioconda did in my install command.

Note that conda install --channel bioconda --yes samtools=1.9 worked fine and installed samtools successfully.

$\endgroup$
1
  • 1
    $\begingroup$ I've heard some folks warn that conda is sensitive to the order in which channels are set/configured. I'm not exactly sure what the details are, but maybe that gives you somewhere to start troubleshooting? $\endgroup$ Feb 25, 2019 at 14:52

1 Answer 1

2
$\begingroup$

I created a file .condarc in my home directory with the following content:

channels:
  - conda-forge
  - bioconda
  - defaults

and it works now. I don't understand why this is necessary though. I thought the channels in the .condarc file would be used if I did not specify them in my command.

$\endgroup$
2
  • 3
    $\begingroup$ This seems to be a bug in the version of conda you're using, it works in 4.6.4. Note, however, that you needed to add -c conda-forge to your original command anyway, since many of the snakemake dependencies come from there. $\endgroup$
    – Devon Ryan
    Feb 26, 2019 at 22:21
  • $\begingroup$ good point about the dependencies. I didn't know about that. I just always give the channel of the package I want to install but it sounds like I also need to give the channel of dependencies. So I'll keep using -c conda-forge -c bioconda -c r in all my conda install commands. $\endgroup$ Feb 27, 2019 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.