In order to use Anaconda’s default channels to install and update packages, you must accept Anaconda’s Terms of Service (TOS). Channels other than Anaconda’s channels may require a TOS acceptance as well. Anaconda has built a plugin that makes viewing and accepting a channel’s TOS more straightforward and transparent to anyone who prefers to use conda at the command line (conda-anaconda-tos).

conda-anaconda-tos augments the existing conda workflow by automatically prompting you to accept the TOS for a given channel when necessary. conda-anaconda-tos is triggered any time you run a conda command that interacts with channels (e.g., using conda create, conda search, conda install, etc.), but is meant to be unobtrusive to your work.

For more information on conda-anaconda-tos, see the plugin’s GitHub repository.

Installing conda-anaconda-tos

You can find conda-anaconda-tos in your (base) environment. If you’re unsure if you have conda-anaconda-tos in your (base) environment, you can check by running the following command:

conda list --name base conda-anaconda-tos

If necessary, install conda-anaconda-tos into your (base) environment by running the following command:

conda install --name base conda-anaconda-tos

An example user interaction

Let’s assume you’ve recently installed the latest version of Miniconda and want to create an environment to install the package pandas. Your command might look like:

conda create --name pandas-env pandas

With no additional configurations, conda searches the following channels by default:

  • https://repo.anaconda.com/pkgs/main
  • https://repo.anaconda.com/pkgs/r
  • https://repo.anaconda.com/pkgs/msys2

conda-anaconda-tos gathers all of the channels in your .condarc file and reviews them to see if they require you to accept a TOS to use them. For each channel that requires a TOS, you will see:

    Gathering channels...
    Reviewing channels...
    Do you accept the Terms of Service (ToS) for https://repo.anaconda.com/pkgs/main?
    [(a)ccept/(r)eject/(v)iew]:
  • Enter a to accept the TOS.
  • Enter r to reject the TOS.
  • Enter v to display a link to a website that contains the TOS you’re being asked to accept.

Whether you accept or reject a TOS, conda will ask you about the next channel, if any, that requires a TOS acceptance. Once you have accepted all required TOS, conda can be used as normal.

Removing a channel with a rejected TOS

Rejecting a channel’s TOS prevents conda from searching for, installing, or updating packages from that channel.

To prevent unnecessary errors from generating after you have rejected the TOS for a channel, remove it from your channels list:

# Replace <CHANNEL> with the name/URL of your channel
conda config --remove channels <CHANNEL>

Using conda tos commands

While conda-anaconda-tos automatically prompts you when a channel’s TOS needs an acceptance, the plugin also has its own set of commands for viewing and managing TOS for the channels listed in your .condarc and/or any other channels that you specify:

Viewing all command options

View all possible command options:

conda tos --help

Displaying your TOS table

Display a table of your channels and any TOS required by them:

conda tos

This command returns a table that displays:

  • A list of all your channels. This includes defaults and the channels in your channels: list.
  • For any channels that have a TOS, a timestamp for when each TOS was last updated (see Version column).
  • The TOS acceptance status. If rejected, the column will display rejected. If accepted, the column will display a timestamp for when the acceptance occurred (see Accepted column).

Managing TOS for all channels

By default, the conda-anaconda-tos plugin displays, accepts, and rejects the TOSes of all channels specified in the defaults and channels: lists in your .condarc file.

Display website URL links to view the text of all applicable TOS:

conda tos view

Accept all TOS for all channels:

conda tos accept

Reject all TOS for all channels:

conda tos reject

Managing TOS per channel

View, accept, or reject the TOS for a specific channel by running a variation of the following command:

# Replace <COMMAND> with a command option (view, accept, reject)
# Replace <CHANNEL> with the channel name/URL you want to specify
conda tos <COMMAND> --override-channels --channel <CHANNEL>

Troubleshooting

Being prompted to re-accept a TOS

Problem

There is a known issue with conda-anaconda-tos where you might be prompted to re-accept a TOS you have already accepted after updating conda. This happens because the plugin currently treats package updates the same as uninstalls for security reasons. If you update your conda environment with conda update -n base --all, the plugin clears your TOS acceptance record as a precaution and you will be prompted again to accept the TOS, when applicable.

Solution

Re-accept any TOS prompts you receive.

While we’re working on a more refined approach to this issue, this ensures you’re always properly consented to use Anaconda’s ToS-governed resources. This behavior will be improved in future releases.

If TOS acceptance prompts are appearing often or if you haven’t updated conda and are receiving TOS acceptance prompts that you have already accepted, this might be an indication that your TOS acceptance record is corrupted.

To solve this issue, you can either clear your cache and TOS acceptance records or fully uninstall and reinstall conda-anaconda-tos, which will also clear your TOS acceptance records.

Open Anaconda Prompt (Terminal on macOS/Linux) and run one of the following commands:

conda tos clean --all

Re-accept any TOS prompts you encounter.