Skip to main content
For an introduction to channels, see What is a channel?

Viewing available channels

To see which channels conda is currently configured to use, open Anaconda Prompt (Terminal on macOS/Linux) and run the following command:
conda config --show channels
Example return
channels:
  - defaults
  - conda-forge

Configuring channels

Conda reads its channel configuration from the .condarc file. To add, remove, or reorder channels, you’ll need to edit this file.

Locating your .condarc file

To locate your .condarc file, open Anaconda Prompt (Terminal on macOS/Linux) and run the following command:
conda config --show-sources
Example return:
==> /Users/<USERNAME>/miniconda3/.condarc <==
channels:
  - defaults
The .condarc is a hidden file on macOS and Linux. View hidden files and folders using the following guidance for your operating system:
Use Shift+Cmd+. in your Finder.

For more information on the .condarc file, see Using the .condarc conda configuration file in the official conda documentation.

Managing channels

Channels can be added to and removed from your channels: list by using conda commands in Anaconda Prompt (Terminal on macOS/Linux) or by manually editing your .condarc file.
Keep channel priority in mind when configuring your channels.
Use one of the following commands to add or remove a channel from your channels: list:
conda config <FLAG> channels <CHANNEL>
Replace <FLAG> with one of the command flags in the table below.
Replace <CHANNEL> with the channel you want to configure.
Command flagDescription
--addAdd a channel to the top of your channels: list.
--prependAdd a channel to the top of your channels: list.
--appendAdd a channel to the bottom of your channels: list.
--removeRemove a channel from your channels: list.
Example
conda config --add channels conda-forge

Configuring defaults

The defaults entry in your channels: list is a special alias. When conda reaches the defaults channel in the channels: list, it searches the channels listed under default_channels: in descending order. If you haven’t configured any default_channels:, conda uses the hardcoded defaults that ship with Anaconda Distribution and Miniconda. The default_channels: list can also be configured by using conda commands in Anaconda Prompt (Terminal on macOS/Linux) or by manually editing your .condarc file.
Adding any channel to the default_channels: list overwrites the hardcoded defaults that ship with Anaconda Distribution and Miniconda.
conda config --add default_channels <CHANNEL>
Replace <CHANNEL> with the URL of the channel you want to add.

Installing packages from a specific channel

When you run conda install, conda searches channels in your .condarc in priority order. To install a package from a specific channel, use either the double-colon syntax or the --channel flag. Both methods install a package from the channel you specify, but with different behaviors.
Using the double-colon syntax installs the package from the specified channel, but installs that package’s dependencies from the channels in your .condarc file, following channel priority order.
conda install <CHANNEL>::<PACKAGE>
Replace <CHANNEL> with the channel you want to install from.
Replace <PACKAGE> with the package you want to install.
This is the recommended syntax for installing packages from a specific channel, as it is the least invasive to your environment.

Using a channel alias

A channel alias lets you refer to channels by name instead of their full URL. The default alias is https://conda.anaconda.org, so when you specify a channel like conda-forge by name in a conda command, conda automatically expands it to https://conda.anaconda.org/conda-forge. For example, instead of having to run:
conda install --channel https://conda.anaconda.org/conda-forge numpy
You can run:
conda install --channel conda-forge numpy
You can configure the channel alias to point to a different location, such as an Anaconda Platform (Self-hosted) server. For more information about setting a channel alias, see channel_alias: Set a channel alias in the official conda documentation.