Before you begin

Using Package Security Manager (Cloud) requires membership to an organization with a current subscription. If you’re working with an Anaconda representative, they will create and subscribe your organization for you. Getting started involves installing conda software on your computer, then configuring it to access your organization’s channels. Configuration involves issuing and setting an organization access token, then adding your organization’s channels to your .condarc file. Once you’re set up, you can start building conda environments for your projects using secure, approved software packages.

Installing Anaconda software

Installing conda

You can obtain conda by installing either Anaconda Distribution or Miniconda. If you already have conda installed, skip ahead to Installing Anaconda Navigator. If you do not have conda installed, go to anaconda.com/download, create an account or sign in, select either Anaconda Distribution or Miniconda, and then install it on your system before proceeding.
If you’re unsure which to download, refer to Getting Started with Anaconda for guidance.

Installing Anaconda Navigator

Anaconda Navigator is a desktop graphical user interface (GUI) that uses conda to help you manage your environments.
If you installed Anaconda Distribution, you already have Anaconda Navigator and can skip ahead to Installing token management tools.
Installing Anaconda Navigator is optional. You can manage your environments and packages using the CLI, if you prefer.
If you installed Miniconda and want to use Anaconda Navigator, you can install it by opening Anaconda Prompt (Terminal on macOS/Linux) and running the following command:
conda install anaconda-navigator
If you received a “conda: command not found” error, see this troubleshooting topic to resolve the issue.

Installing token management tools

Install both of the following tools to manage your Anaconda.com organization access token.

Issuing and setting your token

In order to authenticate to Anaconda, you must issue and set an organization access token for yourself. For more information about tokens, see Tokens.
You must be assigned a seat within your organization to issue yourself a token. If you have not been assigned a seat, speak with your organization administrator.
Use one of the following methods to issue and set your organization access token:
Issuing a token using anaconda-auth automatically sets the token for you.
  1. Open Anaconda Prompt (Terminal on macOS/Linux).
  2. Issue and set your token by running the following command:
    anaconda token install
    
    This command initiates a sign-in workflow in a browser window. If you are already signed in, authentication is automatically completed. If you are not signed in, you are prompted to sign in with your Anaconda.com credentials.If your organization has configured SSO, you are redirected to your company’s SSO login page.
    If you belong to more than one organization, use the arrow keys to select the organization you want to issue and set a token for.
    This command also configures your .condarc file to use Anaconda’s curated repository channels at repo.anaconda.cloud.
  3. Return to your terminal and follow the prompts to complete the workflow.
For information about where your token is stored on your system, see Token storage.

Important information about the .condarc file

The .condarc file is a configuration file that tells conda where to look for packages. Here is an example of what your .condarc file might look like:
Example .condarc file
channel_settings:
  - channel: https://repo.anaconda.cloud/*
    auth: anaconda-auth
channels:
  - https://repo.anaconda.cloud/repo/<ORG_ID>/<CHANNEL_NAME> # Business tier only
  - defaults
default_channels:
  - https://repo.anaconda.cloud/repo/main
  - https://repo.anaconda.cloud/repo/r
  - https://repo.anaconda.cloud/repo/msys2
Conda searches for requested packages starting with the first entry in the channels: list in your .condarc file. If the requested package is not located in that channel, conda continues searching using the next entry in the channels: list. When conda reaches the defaults entry in the channels: list, it searches the channels listed under the default_channels: list, in the same descending order. This is called “channel priority”, and it determines which source conda uses first when resolving packages. In this example for Business tier, conda will look for a requested package in your organization’s channel first, then will look in the default channels in listed order, starting with https://repo.anaconda.cloud/repo/main, then https://repo.anaconda.cloud/repo/r, and finally, in https://repo.anaconda.cloud/repo/msys2. For Pro tier (legacy), conda will look in the default channels in listed order, starting with https://repo.anaconda.cloud/repo/main, then https://repo.anaconda.cloud/repo/r, and finally, in https://repo.anaconda.cloud/repo/msys2. For more information regarding the .condarc file, see the official conda documentation.

Viewing your .condarc file

You can view and edit your .condarc file in either Navigator or the CLI:

Adding an organization channel to your .condarc file

Business tier only.
In order to access packages from your organization’s channels, you must configure your .condarc file to tell conda where the channel is located. Complete the following steps to add one of your organizations’ channels to your .condarc file:
  1. Navigate to your Organizations page.
  2. Select your organization.
  3. Select Channels from the left-hand navigation.
  4. Select Copy channel path.
  5. Open your terminal and run the following command:
    # Replace <CHANNEL_PATH> with the copied channel path
    conda config --prepend channels <CHANNEL_PATH>
    
    This command adds the specified channel to the top of your channels: list, giving it top priority when conda is searching for packages. For more information about channel priority and additional conda config command arguments, see Channels.
    Example .condarc file
    channel_settings:
      - channel: https://repo.anaconda.cloud/*
        auth: anaconda-auth
    channels:
      - https://repo.anaconda.cloud/repo/<ORG_ID>/<CHANNEL_NAME>
      - defaults
    add_anaconda_token: true
    restore_free_channel: false
    default_channels:
      - https://repo.anaconda.cloud/repo/main
      - https://repo.anaconda.cloud/repo/r
      - https://repo.anaconda.cloud/repo/msys2
    
    If you want to use your organizations’ channels exclusively, make sure that they are the only channels present in your .condarc’s channels: list.

Using Anaconda behind a firewall or proxy (Optional)

Some companies have security policies that prevent communications on their network with external servers like Anaconda. Under these circumstances, you’ll need to connect to your company’s firewall/proxy server in order to download packages successfully. To connect to a firewall/proxy server, you’ll need to include a proxy_servers: section in the .condarc file that contains the URL to the proxy server. This entry must also contain a username and password for logging in to the proxy server. Speak with your IT Administrator if you do not have this information. There are no commands to include this portion of the .condarc file, so you need to manually include the following lines:
If your password contains special characters, you’ll need to escape them using percent encoding as described here.
# Replace <USERNAME> with the username for your proxy server
# Replace <PASSWORD> with the password for your proxy server
# Replace <URL> with the URL to your proxy server
proxy_servers:
  http: http://<USERNAME>:<PASSWORD>@<URL>:8080
  https: https://<USERNAME>:<PASSWORD>@<URL>:8443
You’ll also need to work with your IT team to allowlist connections to the main package repositories once you’ve configured your connection to the firewall/proxy server. The main package repositories are:
https://anaconda.org
https://repo.anaconda.com
https://repo.anaconda.cloud
In some situations, it is necessary to export the HTTP_PROXY and HTTPS_PROXY environment variables to utilize the proxy server. To export your environment variables, open a terminal and run the following commands:
# Replace <USERNAME> with the username for your proxy server
# Replace <PASSWORD> with the password for your proxy server
# Replace <URL> with the URL to your proxy server
export HTTP_PROXY=http://<USERNAME>:<PASSWORD>@<URL>:8080
export HTTPS_PROXY=https://<USERNAME>:<PASSWORD>@<URL>:8443
For more information about using conda behind a proxy server, see Configure conda for use behind a proxy server.

Verifying your configurations

Test your configurations and verify that conda downloads packages from the desired channel in either Anaconda Navigator or the CLI:
  1. Open Anaconda Navigator.
    If you downloaded miniconda, you can start Anaconda Navigator by running anaconda-navigator in your Anaconda Prompt (Terminal on macOS/Linux).
  2. Go to Environments in the secondary navigation, then select Create at the bottom of the window.
  3. Enter a name for your environment and select a version of Python (3.11 is preferred) from the dropdown menu, then click Create.
  4. Change the package selector to Not installed. This will show you packages that are available from your channel but are not installed on your machine.
  5. If you know the name of the package you need, you can enter it in the search bar to locate the package. Select a package to download and click Apply.
  6. Click Apply to install the selected packages (and their dependencies).
    The Channel column will display your organization’s channel path, if correctly configured.