问题描述
(base)root@/ai/stor# conda create -n llm_env python 3.10 -yCondaToSNonInteractiveError: Terms of Service have not been acceptedforthe 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)才能下载包。
解决方法
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即可