Goal: What are channels and how can they be used and configured.
What are Channels?
Managing channels: Conda channels are the locations where packages are stored. They serve as the base for hosting and managing packages. Conda packages are downloaded from remote channels, which are URLs to directories containing conda packages.
Can’t find package?
Example: I’ve heard SLiM is available to install via conda?
[salexan5@mblog2 ~]$ conda search slim Loading channels: done No match found for: slim. Search: *slim* # Name Version Build Channel r-slim 0.1.1 r36h6115d3f_0 pkgs/r ... r-waveslim 1.8.4 r43h640688f_0 pkgs/r
Additional Common Channels:
bioconda: (>10K packages) Bioconda is a distribution of bioinformatics software realized as a channel for the versatile Conda package manager.
conda-forge packages:
[salexan5@mblog2 ~]$ conda search bioconda::slim Loading channels: done No match found for: bioconda::slim. Search: bioconda::*slim* # Name Version Build Channel gargammel-slim 1.1.2 h06294c5_5 bioconda ... slimfastq 2.04 he1b5a44_0 bioconda ... slimm 0.3.4 hf1761c0_4 bioconda
[salexan5@mblog2 ~]$ conda search conda-forge::slim Loading channels: done # Name Version Build Channel slim 3.3.2 he1b5a44_0 conda-forge ... slim 4.2.2 h59595ed_0 conda-forge
Add Channel
[salexan5@mblog1 ~]$ conda config --add channels conda-forge [salexan5@mblog1 ~]$ cat ~/.condarc ... channels: - conda-forge - defaults [salexan5@mblog1 ~]$ conda info
[salexan5@mblog1 ~]$ conda info ... channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/linux-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/linux-64 https://repo.anaconda.com/pkgs/r/noarch ...
Search for SLiM
[salexan5@mblog2 ~]$ conda search slim Loading channels: done # Name Version Build Channel slim 3.3.2 he1b5a44_0 conda-forge ... slim 4.2.2 h59595ed_0 conda-forge
No need to explicitly define the channel in the search command as it is not part of our general conda configuration.
Channel Options
The channel option can be defined within a number of other commands, such as conda install
:
[salexan5@mblog2 ~]$ conda install --help usage: conda install [-h] [--revision REVISION] [-n ENVIRONMENT | -p PATH] [-c CHANNEL] [--use-local] [--override-channels] [--repodata-fn REPODATA_FNS] [--experimental {jlap,lock}] [--no-lock] [--repodata-use-zst | --no-repodata-use-zst] [--strict-channel-priority] [--no-channel-priority] [--no-deps | --only-deps] [--no-pin] [--copy] [--no-shortcuts] [--shortcuts-only SHORTCUTS_ONLY] [-C] [-k] [--offline] [--json] [-v] [-q] [-d] [-y] [--download-only] [--show-channel-urls] [--file FILE] [--solver {classic,libmamba}] [--force-reinstall] [--freeze-installed | --update-deps | -S | --update-all | --update-specs] [-m] [--clobber] [--dev] [package_spec ...] ... Channel Customization: -c CHANNEL, --channel CHANNEL Additional channel to search for packages. These are URLs searched in the order they are given (including local directories using the 'file://' syntax or simply a path like '/home/conda/mychan' or '../mychan'). Then, the defaults or channels from .condarc are searched (unless --override-channels is given). You can use 'defaults' to get the default packages for conda. You can also use any name and the .condarc channel_alias value will be prepended. The default channel_alias is https://conda.anaconda.org/. ...
Prev | Workshop Home | Next |