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 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:
Select the desired package.
Navigate to the Settings tab.
Select Admin in the sidebar.
Select Private.
Note
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 Anaconda Prompt (Terminal on macOS/Linux), 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 Anaconda Prompt (Terminal on macOS/Linux), run the following command:
# Replace <TOKEN> with the provided token
# Replace <CHANNEL> with a user channel
# Replace <PACKAGE> with the name of the package you want to install
conda install -c https://conda.anaconda.org/t/<TOKEN>/<CHANNEL> <PACKAGE>
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> with the name of the package you want to install
conda install -c https://conda.anaconda.org/t/<TOKEN>/<CHANNEL>/label/<LABEL_NAME> <PACKAGE>
Using the token to access private PyPI packages#
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:
Create an organization.
Create a group (which can be read-only) in that organization.
Add the desired users to the group.
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:
In a browser, navigate to the desired channel.
Open Anaconda Prompt (Terminal on macOS/Linux) and run the following command:
# Replace <ORGANIZATION> with the organization name # Replace <PACKAGE> with the package name conda install anaconda-client anaconda login conda install -c https://conda.anaconda.org/<ORGANIZATION> <PACKAGE>