Table of Contents

If you’re deploying a Python application in 2026 using Docker, a CI/CD pipeline, or an automated bash script, you might suddenly encounter a build-breaking error that stops everything in its tracks:

CondaToSNonInteractiveError: Terms of Service have not been accepted for the following channels. Please accept or remove them before proceeding:
• https://repo.anaconda.com/pkgs/main
• https://repo.anaconda.com/pkgs/r

This frustrating issue stems from a major policy update by Anaconda. In this deep dive, we’ll explain exactly why the condatosnoninteractiveerror occurs and how you can permanently fix it in your automated environments.


What Causes the CondaToSNonInteractiveError?

In mid-2025, Anaconda rolled out a major update to its Terms of Service (ToS) policy. To enforce this, recent versions of Conda (and Miniconda) bundle a plugin called conda-anaconda-tos. This plugin checks whether you have explicitly accepted the Terms of Service for Anaconda’s commercial repository channels (like defaults, main, and r).

If you run Conda manually in a terminal, it prompts you: “Do you accept the Terms of Service?” However, when you run Conda inside a Dockerfile, GitHub Actions, Jenkins, or any other automated script, there is no interactive terminal to capture your “Yes” response. Because Conda cannot prompt you, it immediately throws the CondaToSNonInteractiveError and terminates the process.

Note on Licensing: Before bypassing this error, remember that Anaconda’s Terms of Service dictate that for-profit organizations with more than 200 employees require a paid commercial license to use the defaults channel. Ensure your usage complies with their terms.

How to Fix CondaToSNonInteractiveError in 2026

Fortunately, fixing this issue is straightforward. Here are the three best methods to resolve the error depending on your workflow.

Method 1: Environment Variable (Recommended)

The cleanest and most reliable fix for Dockerfiles and CI/CD pipelines is to set the CONDA_PLUGINS_AUTO_ACCEPT_TOS environment variable to true. This silently accepts the agreement on your behalf.

In a Dockerfile:

ENV CONDA_PLUGINS_AUTO_ACCEPT_TOS=true
RUN conda install -y python=3.10

In a Linux/macOS bash script:

export CONDA_PLUGINS_AUTO_ACCEPT_TOS=true
conda install -y numpy

In a Windows Batch script:

set CONDA_PLUGINS_AUTO_ACCEPT_TOS=true
conda install -y pandas

Method 2: CLI Accept Command

If you prefer not to use environment variables, you can explicitly accept the terms via the Conda CLI before installing your packages. This tells the conda-anaconda-tos plugin that you have actively reviewed and accepted the terms for the specific channels throwing the error.

RUN conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main \
 && conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r \
 && conda install -y scipy

Method 3: Switch to Conda-Forge

Since the Terms of Service only apply to Anaconda’s proprietary defaults channel, you can bypass the error entirely by exclusively using the open-source community channel: conda-forge.

If you remove the defaults channel and force strict conda-forge usage, the ToS check is never triggered.

RUN conda config --remove channels defaults \
 && conda config --add channels conda-forge \
 && conda config --set channel_priority strict \
 && conda install -y scikit-learn

Which Method Should You Choose?

  • Use Method 1 (Env Variable) if you want the absolute fastest fix with minimal code changes to an existing pipeline.
  • Use Method 2 (CLI) if your organization’s security policies forbid auto-accepting licenses via environment variables.
  • Use Method 3 (Conda-Forge) if you work at a large enterprise (>200 employees) and want to avoid Anaconda’s commercial licensing fees entirely.

Conclusion

The CondaToSNonInteractiveError is an intentional roadblock introduced to ensure users acknowledge Anaconda’s updated licensing rules. While it can cause sudden headaches in automated Docker builds or CI workflows, adding a single environment variable—CONDA_PLUGINS_AUTO_ACCEPT_TOS=true—is all it takes to get your pipelines running smoothly again in 2026.

Pro Tip: Upgrading your base Miniconda image? Ensure you run a quick test build locally with Docker to catch interactive prompts before pushing your branch to production CI!

Related Technical Deep Dives

Categorized in: