问题描述
bash
(base) root@/ai/stor# conda create -n llm_env python 3.10 -y
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
To accept these channels' Terms of Service, run the following commands:
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main
conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
For information on safely removing channels from your conda configuration,
please see the official documentation:
https://www.anaconda.com/docs/tools/working-with-conda/channels
问题分析
这个错误是因为使用的 Miniconda 版本(或其默认配置的 Anaconda 频道)要求用户显式接受其 服务条款(Terms of Service, ToS) 才能下载包。
解决方法
bash
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 create -n llm_env python 3.10 -y即可