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

# Using the main-x channel

`main-x` is an Anaconda-hosted authenticated channel (A location (URL or file path) in a repository where conda looks for packages.) that provides thousands of additional conda packages built by Anaconda for users with an [Anaconda account](https://auth.anaconda.com/ui/registration/7dc50201-417b-43ce-a64d-2e41df2afb9e). It is designed to be used alongside Anaconda's `main` channel, not replace it. In other words, `main-x` "extends" `main`.

## Setting up `main-x`

> [!NOTE]
>
> If you are using Package Security Manager (On-prem), [follow the separate access instructions below](#accessing-main-x-for-package-security-manager-on-prem).

### Before you begin

You need [conda](https://anaconda.com/docs/getting-started/installation.md) and an [Anaconda account](https://auth.anaconda.com/ui/registration/7dc50201-417b-43ce-a64d-2e41df2afb9e).

If you have the [Anaconda CLI](https://anaconda.com/docs/cli-reference/anaconda-cli/getting-started.md#install) installed, use the instructions under **Set up using Anaconda CLI** for a faster setup.

> [tab] Set up using Anaconda CLI
>
> ### Enable the `main-x` channel
>
> 1. Log in to your Anaconda account:
>
>    ```bash theme={null}
>    ana login
>    ```
>
>    This opens a verification page in your browser and displays the URL in your terminal. The URL contains a user code (for example, `user_code=ABCD-12E3`).
>
> 2. Sign in to your Anaconda account. Confirm that the code shown on the page matches the code in the URL in your terminal, then click **Activate**.
>
>    > [!NOTE]
>    >
>    > If you are on a remote server or headless system where a browser cannot open, copy the URL or scan the QR code on any device with a browser, sign in, and then activate. The login completes on the remote system. For more options, see [Non-interactive login for CI/CD](https://anaconda.com/docs/cli-reference/anaconda-cli/authentication.md#non-interactive-login-for-ci/cd).
>
> 3. Enable the `main-x` channel:
>
>    ```bash theme={null}
>    ana feature enable main-x
>    ```
>
>    This adds `main` and `main-x` to the channels conda uses by default, with the correct URLs for your subscription.
>
> ### Verify the channel is working
>
> 1. Confirm that your default channels are configured:
>
>    ```bash theme={null}
>    conda config --show default_channels
>    ```
>
>    Your output should include both `main` and `main-x`. The URLs vary based on your subscription:
>
>    > [tab] Free account
>    >
>    > ```yaml theme={null}
>    > default_channels:
>    >   - https://repo.anaconda.com/pkgs/main
>    >   - https://repo.anaconda.cloud/repo/main-x
>    >   - https://repo.anaconda.com/pkgs/msys2
>    >   - https://repo.anaconda.com/pkgs/r
>    > ```
>
>    > [tab] Paid subscription
>    >
>    > ```yaml theme={null}
>    > default_channels:
>    >   - https://repo.anaconda.cloud/repo/main
>    >   - https://repo.anaconda.cloud/repo/main-x
>    >   - https://repo.anaconda.cloud/repo/msys2
>    >   - https://repo.anaconda.cloud/repo/r
>    > ```
>
>    > [!NOTE]
>    >
>    > The `msys2` and `r` channels are [End of Support](https://anaconda.com/docs/reference/policies-practices/software-version-support.md#end-of-support-eos) and are no longer receiving updates. You do not need to remove them.
>
> 2. Install a package from `main-x` to confirm everything is working:
>
>    > [!NOTE]
>    >
>    > Browse packages on `main-x` at [https://anaconda.org/channels/main-x](https://anaconda.org/channels/main-x).
>
>    ```bash theme={null}
>    conda install <PACKAGE_NAME>
>    ```
>
>    Comments
>
>    Replace \<PACKAGE\_NAME> with the name of the package you want to install.
>
> For more information, see [Anaconda CLI features](https://anaconda.com/docs/cli-reference/anaconda-cli/features.md).

> [tab] Set up using conda
>
> ### Configuration
>
> 1. Log in to your Anaconda account:
>
>    ```sh theme={null}
>    anaconda login
>    ```
>
> 2. Follow the verification URL displayed in your terminal. Sign in to your Anaconda account, confirm the code on the page matches the code in your terminal, and then click **Activate**.
>
>    > [!NOTE]
>    >
>    > If you are on a remote server or headless system where a browser cannot open, copy the URL on any device with a browser, sign in, and then activate. If you need other authentication options, see [Non-interactive usage](https://anaconda.com/docs/cli-reference/anaconda-auth/getting-started.md#non-interactive-usage).
>
> 3. Add `main` and `main-x` to your `default_channels`. The `main` channel URL depends on your subscription:
>
>    > [tab] Free account
>    >
>    > ```sh theme={null}
>    > conda config --add default_channels https://repo.anaconda.cloud/repo/main-x
>    > conda config --add default_channels https://repo.anaconda.com/pkgs/main
>    > ```
>
>    > [tab] Paid subscription
>    >
>    > ```sh theme={null}
>    > conda config --add default_channels https://repo.anaconda.cloud/repo/main-x
>    > conda config --add default_channels https://repo.anaconda.cloud/repo/main
>    > ```
>
>    These commands add `main` and `main-x` to the front of your `default_channels` list in your `.condarc` file. If that file does not have a `default_channels` section yet, conda creates one.
>
>    > [!WARNING]
>    >
>    > All `main-x` packages depend on packages from `main` (either directly or indirectly), so you should always list `main` first, followed by `main-x`. If `default_channels` lists only `main-x`, conda cannot resolve those dependencies, and many installs will fail.
>
> ### Verify the channel is working
>
> 1. Check your channel settings:
>
>    ```sh theme={null}
>    conda config --show default_channels
>    ```
>
>    Your output should include both `main` and `main-x`, and `main` should appear before `main-x`. For example:
>
>    ```yaml theme={null}
>    default_channels:
>      - https://repo.anaconda.com/pkgs/main
>      - https://repo.anaconda.cloud/repo/main-x
>    ```
>
> 2. Install a package from `main-x` to confirm everything is working:
>
>    > [!NOTE]
>    >
>    > Browse packages on `main-x` at [https://anaconda.org/channels/main-x](https://anaconda.org/channels/main-x).
>
>    ```bash theme={null}
>    conda install <PACKAGE_NAME>
>    ```
>
>    Comments
>
>    Replace \<PACKAGE\_NAME> with the name of the package you want to install.

## Accessing `main-x` for Package Security Manager (On-prem)

Ask your administrator to [mirror](https://anaconda.com/docs/psm-on-prem/6.8.0/admin/mirrors.md#conda-external-source-url) `https://repo.anaconda.cloud/repo/main-x` into your Package Security Manager instance to provide access to `main-x` for your organization.

Add the mirrored channel to the `default_channels:` section of your `.condarc` file, alongside your organization's other channels. Don't remove existing entries, such as your organization's mirror of `main`, as `main-x` packages often need packages from `main`. Use only channels from your Package Security Manager instance, not the public channel addresses shown elsewhere on this page. If your file has no `default_channels:` section, ask your administrator which channels to list.

The mirrored channel's address looks like this:

```text theme={null}
https://<FQDN>/api/repo/<CHANNEL_NAME>
```

Comments

Replace \<FQDN> with the fully qualified domain name of your Package Security Manager instance.\\

Replace \<CHANNEL\_NAME> with the name your administrator gave the mirrored `main-x` channel.

> [!NOTE]
>
> If you have a channel alias set for your Package Security Manager instance, you can use just the channel name instead of the full URL in your `default_channels` list. For more information, see [Using conda with Package Security Manager](https://anaconda.com/docs/psm-on-prem/6.8.0/user/conda.md#conda-config-commands).

## Known limitations

* `main-x` includes thousands of packages (pure Python only) that extend what's available in the `main` channel. `main-x` does not include every package in the PyPI or conda-forge catalog.
* Service accounts for accessing the `main-x` channel are not available. For non-interactive authentication in pipelines, see the [API keys and tokens](https://anaconda.github.io/anaconda-auth/#api-keys-and-tokens) documentation for guidance on using those options with `main-x`.
* Some packages exist in both the `main-x` and `main` channels. Users with `channel_priority: strict` might encounter a problem where conda will not install a preferred package from `main-x` if the same package exists in a higher-priority channel. Users with `channel_priority: flexible` (the default) might also be affected if the order of their channels doesn't reflect their preferred priority. See [Troubleshooting](#troubleshooting) if you experience this.

## Support

### Package requests

If you need a package that is not in `main-x`, create a post on Anaconda's [Feedback page](https://www.anaconda.com/feedback) on the **Packages** board. Include the following:

* The package name and version you need
* Your operating system and platform (for example, Windows 11, macOS Sonoma on Apple Silicon, Ubuntu 22.04)
* (Optional) A description of your use case

### Technical support

For issues, bugs, or questions about `main-x`, [submit a support request](https://support.anaconda.com/hc/en-us/requests/new?ticket_form_id=360000993773). Include the following:

* A description of the issue or question
* The command(s) you ran and the full error message (if applicable)
* Your operating system and platform
* Your conda version

> [accordion] How do I find my conda version?
>
> Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux) and run the following:
>
> ```bash theme={null}
> conda --version
> ```

Our support team will triage your request and send it to the appropriate team.

If the problem is with the Anaconda CLI itself, you can also report it by running:

```sh theme={null}
ana self feedback
```

This opens a page in your browser where you can report a bug or request a feature for the Anaconda CLI.

## Troubleshooting

Troubleshoot

### `anaconda login` returns an error or is not recognized

***

<details>
  <summary>Cause</summary>

  The `anaconda-auth` package is not installed in your base environment. `anaconda-auth` is included by default with Anaconda Distribution and Miniconda, but it might be missing if it was removed or if you are using a minimal conda installation.
</details>

***

<details>
  <summary>Solution</summary>

  Install `anaconda-auth` in your base environment:

  ```sh theme={null}
  conda install --name base anaconda-auth
  ```

  After installing, run `anaconda login` again.
</details>

Troubleshoot

### `AnacondaAuthError` when running `conda install` with `main-x`

***

<details>
  <summary>Cause</summary>

  Versions of `anaconda-auth` older than 0.14.4 incorrectly required a business plan token to install packages from `main-x`.
</details>

***

<details>
  <summary>Solution</summary>

  1. Open Anaconda Prompt (A command-line application included with Windows installations of Anaconda Distribution and Miniconda. Find it by searching 'Anaconda Prompt' in the Windows Start menu.) (Terminal on macOS/Linux).
  2. Update `anaconda-auth` to the latest version:

     ```sh theme={null}
     conda update --name base anaconda-auth
     ```
</details>

Troubleshoot

### Error while loading conda entry point: conda-env-log

***

<details>
  <summary>Cause</summary>

  Versions of `anaconda-env-log` older than 0.4.1 are incompatible with conda 26.3.0 or later. If you have an older version of the package installed, you will see `Error while loading conda entry point: conda-env-log` after every conda command.
</details>

***

<details>
  <summary>Solution</summary>

  1. Update `anaconda-env-log`:

     ```sh theme={null}
     conda install --name base "anaconda-env-log>=0.4.1"
     ```

  2. Update conda:

     ```sh theme={null}
     conda install --name base "conda>=26.3.0"
     ```

  If you previously pinned conda to version 26.1.1 to work around this issue, remove the pin before running the commands above. Open the `pinned` file in your conda installation's `conda-meta` folder and remove the `conda==26.1.1` line.

  > [!NOTE]
  >
  > You can replace `anaconda3` with `miniconda3` in any of these paths to find your `pinned` file.

  > [tab] Windows
  >
  > `C:\Users\<USERNAME>\anaconda3\conda-meta\pinned`

  > [tab] macOS/Linux
  >
  > `~/anaconda3/conda-meta/pinned` or `/opt/anaconda3/conda-meta/pinned`
</details>

Troubleshoot

### A package from `main-x` is not installing as expected

***

<details>
  <summary>Cause</summary>

  Some packages exist in both `main-x` and `main`. If `main-x` is added as a standalone entry in your `channels:` list, conda treats it as a separate channel that competes for priority with `main`.

  * With `channel_priority: strict`, conda will not pull from `main-x` if the same package name exists in a higher-priority channel.

  * With `channel_priority: flexible` (the default), the solver might still prefer `main` depending on your channel ordering.
</details>

***

<details>
  <summary>Solution</summary>

  `main-x` and `main` are designed to be used together as a unified set of Anaconda-curated packages (`main-x` *extends* `main`). If your goal is to prioritize Anaconda-curated packages, instead of listing `main-x` as a standalone channel, add it and `main` to `default_channels:` in your `.condarc` file. For instructions on locating your `.condarc` file, see [Configuring channels](https://anaconda.com/docs/getting-started/working-with-conda/channels.md#configuring-channels).

  ```yaml highlight={3-7} theme={null}
  channels:
    - defaults
  default_channels:
    - https://repo.anaconda.com/pkgs/main
    - https://repo.anaconda.cloud/repo/main-x
    - https://repo.anaconda.com/pkgs/msys2
    - https://repo.anaconda.com/pkgs/r
  ```

  > [!NOTE]
  >
  > With some paid subscriptions, the addresses for `main`, `msys2`, and `r` start with `https://repo.anaconda.cloud/repo/` instead. Keep those addresses; don't replace them with the ones shown here.

  This adds `main-x` to `defaults` so that it is treated as the same priority level as `main`, regardless of your `channel_priority` setting.\
  \\

  Run `conda config --show channels` afterward to confirm that `main-x` no longer appears as a separate channel in your `channels:` list.
</details>
