解决CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’
·
问题
当使用conda时遇到报错
conda activate base
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
解决方法
按照提示执行命令conda init bash,新开一个窗口,看下是否成功。
若不成功,可能是因为conda配置问题,按照以下步骤进行解决:
- 执行
source activate - 执行
source deactivate - 执行
conda activate env_name(你的环境名称),查看是否成功 - 将命令加入到~/.bashrc文件中,每次自动执行
source activate
source deactivate
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)