Private packages#

Note

Individual paid plans with private packages are a legacy offering from Anaconda.org that are no longer available. However, anyone who had private packages in the past still has the ability to have those hosted privately.

Making packages private#

By default, all packages, notebooks, and environments uploaded to Anaconda.org are accessible to anyone who has access to the repository.

Note

As of August 30, 2023, only users with paid plans can mark their packages as private.

To mark packages uploaded to your user channel on Anaconda.org as private:

  1. Select the desired package.

  2. Navigate to the Settings tab.

  3. Select Admin in the sidebar.

  4. Select Private.

Note

  • Jupyter notebooks and conda environments can also be marked private using this procedure and URL.

  • Other Anaconda.org users may access your private packages either with tokens or by logging in.

Accessing private packages with tokens#

A token is a random alphanumeric string that is used to restrict and provide access to packages on a channel.

To make your private packages accessible with tokens, create an access token that includes the following scope for Anaconda Client:

conda:download

Or, make the adjustment on anaconda.org: In the access settings, select Allow private downloads from conda repositories.

Using the token to access private packages#

If you intend to install many packages from a private channel, you can include the channel in your .condarc file. This will include the token any time you search for packages on that channel. To add a user channel to your .condarc file from the terminal (Anaconda Prompt for Windows users), run the following command:

# Replace <TOKEN> with the provided token
# Replace <CHANNEL> with a user channel
conda config --add channels https://conda.anaconda.org/t/<TOKEN>/<CHANNEL>

You can also use the token to install packages without first adding the channel to your .condarc file by using the channel’s full URL. In the terminal (Anaconda Prompt for Windows users), run the following command:

# Replace <TOKEN> with the provided token
# Replace <CHANNEL> with a user channel
# Replace <PACKAGE_NAME> with the name of the package you want to install
conda install -c https://conda.anaconda.org/t/<TOKEN>/<CHANNEL> <PACKAGE_NAME>

Accessing a private package that has a label#

To install a package from a channel using the token and label name:

# Replace <TOKEN> with the provided token
# Replace <CHANNEL> with a user channel
# Replace <LABEL_NAME> with the label name
# Replace <PACKAGE_NAME> with the name of the package you want to install
conda install -c https://conda.anaconda.org/t/<TOKEN>/<CHANNEL>/label/<LABEL_NAME> <PACKAGE_NAME>

Using the token to access private PyPI packages#

  1. Private PyPI packages can also be installed in the web UI:

    # Replace <TOKEN> with the provided token
    # Replace <CHANNEL> with a user channel
    https://pypi.anaconda.org/t/<TOKEN>/<CHANNEL>
    

Accessing private packages as a registered user#

To make your private packages available to users who have logged in:

  1. Create an organization.

  2. Create a group (which can be read-only) in that organization.

  3. Add the desired users to the group.

  4. Upload the package to the organization, or transfer an existing package to the organization.

After you grant users access, other users can install your package using the web UI or Anaconda Client.

To install a package:

  1. In a browser, navigate to the desired channel.

  2. Open a terminal (Anaconda Prompt for Windows users) and run the following command:

    # Replace <ORGANIZATION> with the organization name
    # Replace <PACKAGE_NAME> with the package name
    conda install anaconda-client
    anaconda login
    conda install -c https://conda.anaconda.org/<ORGANIZATION> <PACKAGE_NAME>