Managing Terms of Service on the command line
We are aware of an issue with the Anaconda Terms of Service acceptance being prompted for in some continuous integration (CI) environments and actively working on a resolution.
For information on solutions, see the Troubleshooting section below.
For status updates, see our status page.
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:
If necessary, install conda-anaconda-tos
into your (base)
environment by running the following command:
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:
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:
- 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:
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:
Displaying your TOS table
Display a table of your channels and any TOS required by them:
This command returns a table that displays:
- A list of all your channels. This includes
defaults
and the channels in yourchannels:
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:
Accept all TOS for all channels:
Reject all TOS for all channels:
Managing TOS per channel
View, accept, or reject the TOS for a specific channel by running a variation of the following command:
CI/CD Environments
In CI/CD environments (detected via CI=true
), the plugin will automatically accept Terms of Service and print a warning message. This ensures automated builds don’t get blocked waiting for user input.
Docker in CI/CD Environments
When using Anaconda’s Docker images in continuous integration systems, the CI
environment variable might not be automatically passed to the container, which can lead to unexpected ToS prompts during your CI/CD workflows.
We recommend passing the CONDA_PLUGINS_AUTO_ACCEPT_TOS
environment variable to Docker or explicitly accepting the ToS by running conda tos accept
:
-
Pass the
CONDA_PLUGINS_AUTO_ACCEPT_TOS
environment variable to Docker using the Docker CLI: -
Explicitly accept ToS in your Docker command using the Docker CLI:
Docker Containers in GitHub Actions
Similarly, when using Docker containers in GitHub Actions, the CI
environment variable will not be automatically passed.
-
Pass the
CONDA_PLUGINS_AUTO_ACCEPT_TOS
environment variable to Docker: -
Explicitly accept ToS in your Docker command:
Service containers and composite actions in GitHub Actions also inherit the runner’s environment, including the CI
variable. However, manually invoked Docker commands within steps do not automatically inherit these variables.
Troubleshooting
CI/CD workflows erroring
Problem
The conda-anaconda-tos
plugin currently detects CI/CD environments by looking for CI=true
, in order to automatically accept TOS and not cause the workflow to hang while waiting for user input.
CI systems that do not leverage the CI=true
flag are currently experiencing errors because the plugin is waiting for user input to accept TOS. This issue is actively being worked on.
Solution
You can configure auto acceptance of TOS in the following ways:
-
Configure ToS auto acceptance in your
.condarc
file: -
Use the command-line flag (conda >= 25.5.0):
-
Set the environment variable:
For more information on accepting TOS in your Docker containers, see CI/CD Environments above.
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:
Re-accept any TOS prompts you encounter.