> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Channels

export const TroubleshootSolution = ({children}) => <>
    <hr className="my-3 w-full" />
    <details className="mt-3">
      <summary className="cursor-pointer font-semibold text-base mb-1">
        Solution
      </summary>
      <div className="mt-2 ml-4" data-component-part="step-content">
        {children}
      </div>
    </details>
  </>;

export const TroubleshootCause = ({children}) => <details className="mt-3 mb-2">
    <summary className="cursor-pointer font-semibold text-base mb-1">
      Cause
    </summary>
    <div className="mt-2 ml-4" data-component-part="step-content">
      {children}
    </div>
  </details>;

export const TroubleshootTitle = ({children}) => <>
    <p className="m-0 font-semibold text-xl leading-tight mb-2" role="heading" aria-level={3}>
      {children}
    </p>
    <hr className="my-3 w-full" />
  </>;

export const Troubleshoot = ({children}) => <div className="callout my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border troubleshoot-admonition dark:troubleshoot-admonition" data-callout-type="troubleshoot">
    <div className="mt-0.5 w-4">
      <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" className="w-4 h-4" aria-label="Troubleshoot">
        <path d="M541.4 162.6C549 155 561.7 156.9 565.5 166.9C572.3 184.6 576 203.9 576 224C576 312.4 504.4 384 416 384C398.5 384 381.6 381.2 365.8 376L178.9 562.9C150.8 591 105.2 591 77.1 562.9C49 534.8 49 489.2 77.1 461.1L264 274.2C258.8 258.4 256 241.6 256 224C256 135.6 327.6 64 416 64C436.1 64 455.4 67.7 473.1 74.5C483.1 78.3 484.9 91 477.4 98.6L388.7 187.3C385.7 190.3 384 194.4 384 198.6L384 240C384 248.8 391.2 256 400 256L441.4 256C445.6 256 449.7 254.3 452.7 251.3L541.4 162.6z" />
      </svg>
    </div>
    <div className="prose min-w-0 w-full">{children}</div>
  </div>;

export const Comments = ({children}) => {
  return <div class="my-4 px-5 py-4 overflow-hidden rounded-2xl flex gap-3 border border-zinc-500/20 bg-zinc-50/50 dark:border-zinc-500/30 dark:bg-zinc-500/10" data-callout-type="comments">
      <div class="w-4">
        <svg width="14" height="14" viewBox="0 0 640 640" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" aria-label="Comments">
            <path d="M320 112C434.9 112 528 205.1 528 320C528 434.9 434.9 528 320 528C205.1 528 112 434.9 112 320C112 205.1 205.1 112 320 112zM320 576C461.4 576 576 461.4 576 320C576 178.6 461.4 64 320 64C178.6 64 64 178.6 64 320C64 461.4 178.6 576 320 576zM280 400C266.7 400 256 410.7 256 424C256 437.3 266.7 448 280 448L360 448C373.3 448 384 437.3 384 424C384 410.7 373.3 400 360 400L352 400L352 312C352 298.7 341.3 288 328 288L280 288C266.7 288 256 298.7 256 312C256 325.3 266.7 336 280 336L304 336L304 400L280 400zM320 256C337.7 256 352 241.7 352 224C352 206.3 337.7 192 320 192C302.3 192 288 206.3 288 224C288 241.7 302.3 256 320 256z" />
        </svg>
      </div>
      <div class="text-sm prose min-w-0 w-full">
        {children}
      </div>
    </div>;
};

<Note>
  For an introduction to channels, see [What is a channel?](/getting-started/concepts/what-is-a-channel)
</Note>

## Viewing available channels

To see which channels conda is currently configured to use, open [Anaconda Prompt](/reference/glossary#anaconda-prompt) (Terminal on macOS/Linux) and run the following command:

```sh theme={null}
conda config --show channels
```

```yaml Example return theme={null}
channels:
  - defaults
  - conda-forge
```

<Troubleshoot>
  <TroubleshootTitle>
    ### command not found: conda
  </TroubleshootTitle>

  <TroubleshootCause>
    The `command not found: conda` error occurs when your command line interface (CLI) can't find the conda command in order to use it. This might be because:

    * You don't have conda properly initialized.
    * You have set `auto_activate_base` to `false`.
    * You're using a shell that conda doesn't support.
    * Conda is not installed or the install was incomplete or corrupted.

    <Note>
      These issues primarily occur on macOS/Linux computers. Anaconda Distribution and Miniconda installations on Windows include [Anaconda Prompt](/reference/glossary#anaconda-prompt), which opens with conda initialized by default.
    </Note>
  </TroubleshootCause>

  <TroubleshootSolution>
    <AccordionGroup>
      <Accordion title="Initialize conda in your shell">
        If you recently installed Anaconda Distribution or Miniconda, make sure you closed and reopened your CLI to make conda's initialization take effect.

        <Tip>
          If you don't want to close your CLI, you can also use one of the following `source` commands to refresh your shell:

          <CodeGroup>
            ```sh bash theme={null}
            source ~/.bashrc
            ```

            ```sh zsh theme={null}
            source ~/.zshrc
            ```

            ```sh fish theme={null}
            source ~/.config/fish/config.fish
            ```

            ```sh cshrc theme={null}
            source ~/.cshrc
            ```

            ```sh xonshrc theme={null}
            source ~/.xonshrc
            ```
          </CodeGroup>

          <Comments>
            Use the command that matches your shell.
          </Comments>
        </Tip>

        You can also initialize conda directly from its `bin` directory:

        <CodeGroup>
          ```sh Initialization command theme={null}
          <PATH_TO_CONDA>/bin/conda init
          ```

          ```sh Examples theme={null}
          miniconda3/bin/conda init
          /opt/miniconda3/bin/conda init
          anaconda3/bin/conda init
          /opt/anaconda3/bin/conda init
          ```
        </CodeGroup>

        <Comments>
          Replace \<PATH\_TO\_CONDA> with a path to your conda installation.
        </Comments>
      </Accordion>

      <Accordion title="Set auto_activate_base to true">
        To see the value for `auto_activate_base`, run the following command:

        ```sh theme={null}
        conda config --describe auto_activate_base
        ```

        If your terminal returns `false`, this means that conda is not automatically activating your base environment when you start a new shell. This behavior emulates your system Python, and some users prefer to have their conda environment be inactive until they need it. However, this is not conda's default behavior after installation.

        To change the value of `auto_activate_base` to `true`, run the following command:

        ```sh theme={null}
        conda config --set auto_activate_base true
        ```

        If you have `auto_activate_base` set as `false`, the conda command will still be available as a shell function, but your base environment will not be active when a new shell is started. To activate your base environment, run `conda activate`.
      </Accordion>

      <Accordion title="Use a shell that conda supports">
        For information on which shells conda supports, see [Conda activate](https://docs.conda.io/projects/conda/en/stable/dev-guide/deep-dives/activation.html#conda-activate) in the official conda documentation.
      </Accordion>

      <Accordion title="Verify your installation of conda">
        If you have tried to initialize conda in your shell but it didn't work, try uninstalling and reinstalling [Anaconda Distribution](/getting-started/anaconda/main) or [Miniconda](/getting-started/miniconda/main).

        <Tip>
          Make sure that you say yes to the initialization option, and, if installing from the CLI, reinitialize your shell by restarting it or using its `source` command. For more information, see [Initialize conda in your shell](#initialize-conda-in-your-shell).
        </Tip>
      </Accordion>
    </AccordionGroup>
  </TroubleshootSolution>
</Troubleshoot>

## 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:

```sh theme={null}
conda config --show-sources
```

```sh Example return: highlight={1} theme={null}
==> /Users/<USERNAME>/miniconda3/.condarc <==
channels:
  - defaults
```

<Note>
  The `.condarc` is a hidden file on macOS and Linux. View hidden files and folders using the following guidance for your operating system:

  <Tabs>
    <Tab title="macOS">
      Use Shift+Cmd+. in your Finder.
    </Tab>

    <Tab title="Linux">
      Use Alt+. or Ctrl+H (depending on your file manager).
    </Tab>
  </Tabs>

  ***

  For more information on the `.condarc` file, see [Using the .condarc conda configuration file](https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html) in the official conda documentation.
</Note>

### 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.

<Tip>
  Keep [channel priority](/getting-started/concepts/what-is-a-channel#channel-priority) in mind when configuring your channels.
</Tip>

<Tabs>
  <Tab title="Using the command line">
    Use one of the following commands to add or remove a channel from your `channels:` list:

    ```sh theme={null}
    conda config <FLAG> channels <CHANNEL>
    ```

    <Comments>
      Replace \<FLAG> with one of the command flags in the table below.<br />
      Replace \<CHANNEL> with the channel you want to configure.
    </Comments>

    | Command flag | Description                                           |
    | :----------- | :---------------------------------------------------- |
    | `--add`      | Add a channel to the top of your `channels:` list.    |
    | `--prepend`  | Add a channel to the top of your `channels:` list.    |
    | `--append`   | Add a channel to the bottom of your `channels:` list. |
    | `--remove`   | Remove a channel from your `channels:` list.          |

    ```sh Example theme={null}
    conda config --add channels conda-forge
    ```
  </Tab>

  <Tab title="Editing manually">
    1. [Locate](#locating-your-condarc-file) and open your `.condarc` file using your preferred text editor.
    2. Add or remove channel names or URLs from the `channels:` list.
  </Tab>
</Tabs>

<Troubleshoot>
  <TroubleshootTitle>
    ### Channels list adding extra channels
  </TroubleshootTitle>

  <TroubleshootCause>
    A `.condarc` file has been added to the root folder of your Anaconda Distribution and Miniconda installations. This file has a `channels:` list that contains either:

    * a list of hard-coded URLs
    * the `defaults` channel

    When using channels, conda merges all of your computer's `.condarc` files together in specific ways. For more information on how conda uses your `.condarc` files, see the [Searching for .condarc](https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/use-condarc.html#searching-for-condarc) section of the official conda documentation.<br /><br />

    All `channels:` lists in your `.condarc` files are merged together when conda searches for packages. This causes the Anaconda default URLs to be appended to (added to the end of) your `channels:` list.<br /><br />

    To see all the `.condarc` files influencing your currently active conda environment, run the following command:

    ```
    conda config --show-sources
    ```

    This returns a list of `.condarc` file locations and their contents.

    <Tip>
      Your installation directory `.condarc` file should be in the folder where you installed Anaconda Distribution or Miniconda, most likely similar to one of the following:

      ```text theme={null}
      C:\Users\<USERNAME>\anaconda3
      C:\Users\<USERNAME>\miniconda3
      /Users/<USERNAME>/anaconda3
      /Users/<USERNAME>/miniconda3
      /opt/anaconda3
      /opt/miniconda
      ```
    </Tip>
  </TroubleshootCause>

  <TroubleshootSolution>
    There are a few ways you can solve this issue, depending on how you use your `.condarc` file:<br /><br />

    <AccordionGroup>
      <Accordion title="If you have write access to the installation directory .condarc file">
        <AccordionGroup>
          <Accordion title="Add defaults to the installation directory .condarc file (Recommended)">
            If you use `defaults` to configure your channels, you should edit the installer root `.condarc` file to use `defaults` as well.

            1. Locate the installer root `.condarc` file using `conda config --show-sources`.
            2. Add defaults to the installation directory `.condarc` file's `channels:` list, then remove the hardcoded URLs.

               You can edit the files manually using your preferred text editor, or by using the following conda CLI command:

                           <Tip>
                             Use the `--file` flag to specify the path to the root `.condarc` file.
                           </Tip>

               ```
               conda config --file <PATH/TO/YOUR/ROOT>/.condarc --add channels defaults
               conda config --file <PATH/TO/YOUR/ROOT>/.condarc --remove channels <CHANNEL1> <CHANNEL2>
               ```

                           <Accordion title="Example commands">
                             <Tabs>
                               <Tab title="Windows">
                                 ```
                                 conda config --file C:\Miniconda3\.condarc --add channels defaults
                                 conda config --file C:\Miniconda3\.condarc --remove channels https://repo.anaconda.com/pkgs/main https://repo.anaconda.com/pkgs/r https://repo.anaconda.com/pkgs/msys2
                                 ```
                               </Tab>

                               <Tab title="Linux/macOS">
                                 ```
                                 conda config --file /opt/miniconda3/.condarc --add channels defaults
                                 conda config --file /opt/miniconda3/.condarc --remove channels https://repo.anaconda.com/pkgs/main https://repo.anaconda.com/pkgs/r
                                 ```
                               </Tab>
                             </Tabs>
                           </Accordion>

                           <Tip>
                             If you are using `defaults` and want to change the URLs it points to, use `default_channels` in your `.condarc` file. For more information on this setting, see [default\_channels: Default channels](https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/settings.html#default-channels-default-channels) in the official conda documentation.

                             You can edit your `.condarc` manually using your preferred text editor, or by using the following conda CLI command:

                             ```sh theme={null}
                             conda config --add default_channels <CHANNEL>
                             ```

                             <Comments>
                               This command adds one channel at a time.
                               Replace \<CHANNEL> with the URL to your channel.
                             </Comments>

                             To remove a channel instead, replace `--add` with `--remove`.
                           </Tip>
          </Accordion>

          <Accordion title="Delete the installation directory .condarc file">
            If you have your channels configured in a different `.condarc` file (whether you use `defaults` or not), you can also delete the installation directory `.condarc` file.

            <Warning>
              Make sure that you always have at least one `.condarc` file with a `channels:` list defined. Conda requires this to function.
            </Warning>

            1. Locate the installation directory `.condarc` file using `conda config --show-sources`.
            2. Delete the installation directory `.condarc` file. This is a hidden file on macOS and Linux and is not visible in file browsers under normal circumstances.

                           <HiddenFiles />
          </Accordion>
        </AccordionGroup>
      </Accordion>

      <Accordion title="If you do not have write access to the installation directory .condarc file">
        If you do not want to use the `defaults` channels and cannot edit or remove the installation directory `.condarc` file (for example, you installed on macOS using the graphical installer without `sudo` access):

        * You must use the `--override-channels` flag with every conda command that installs or updates packages.
        * You must also specify at least one channel using the `--channel` (or `-c`) flag.

        Example:

        ```
        conda install --override-channels --channel conda-forge numpy
        ```

        This tells conda to ignore all channels in your `.condarc` files and only use the channels you explicitly specify to install or update packages and their dependencies.
      </Accordion>
    </AccordionGroup>

    If you continue to experience issues, please [open a support ticket](https://support.anaconda.com/hc/en-us/requests/new?ticket_form_id=360000993773).
  </TroubleshootSolution>
</Troubleshoot>

### 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](/getting-started/working-with-conda/reference/default-channels) 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.

<Tabs>
  <Tab title="Overwriting your default channels">
    Adding any channel to the `default_channels:` list overwrites the [hardcoded defaults](/getting-started/working-with-conda/reference/default-channels) that ship with Anaconda Distribution and Miniconda.

    ```sh theme={null}
    conda config --add default_channels <CHANNEL>
    ```

    <Comments>
      Replace \<CHANNEL> with the URL of the channel you want to add.
    </Comments>
  </Tab>

  <Tab title="Removing the defaults channel">
    <Warning>
      Do not remove `defaults` from your `channels:` list if it is the only channel that you have configured in your `.condarc`. Doing so causes conda to error. Before you remove `defaults`, add another channel to your `channels:` list.
    </Warning>

    Remove `defaults` from your `channels:` list by running the following command:

    ```sh theme={null}
    conda config --remove channels defaults
    ```
  </Tab>
</Tabs>

## 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.

<Tabs>
  <Tab title="Using the double-colon syntax">
    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.

    ```sh theme={null}
    conda install <CHANNEL>::<PACKAGE>
    ```

    <Comments>
      Replace \<CHANNEL> with the channel you want to install from. <br />
      Replace \<PACKAGE> with the package you want to install.
    </Comments>

    <Tip>
      This is the recommended syntax for installing packages from a specific channel, as it is the least invasive to your environment.
    </Tip>
  </Tab>

  <Tab title="Using the --channel flag">
    Using the `--channel` flag installs the package *and* the package's dependencies from the specified channel. The channel you specify temporarily becomes the top priority channel in your list. This means more packages might end up being installed or updated from the specified channel than intended.

    If any dependencies are not found in the specified channel, conda searches down the rest of your channels in priority order.

    ```sh theme={null}
    conda install --channel <CHANNEL> <PACKAGE>
    ```

    <Comments>
      Replace \<CHANNEL> with the channel you want to install from. <br />
      Replace \<PACKAGE> with the package you want to install.
    </Comments>
  </Tab>
</Tabs>

## 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:

```sh theme={null}
conda install --channel https://conda.anaconda.org/conda-forge numpy
```

You can run:

```sh theme={null}
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](https://docs.conda.io/projects/conda/en/stable/user-guide/configuration/settings.html#channel-alias-set-a-channel-alias) in the official conda documentation.
