CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.
1.git提交或克隆报错fatal: unable to access 'https://github.com/xxx/': Failed to connect to github.com port 443 after 21087 ms: Couldn't connect to server2.当前python第三方包版本太高,如何降低版本3.清除Linux终端屏幕4.Git 配置代理5.23年最新版pycharm找不到conda可执行文件解决办法6.backbone、head、neck等深度学习中的术语解释
7.CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.
8.出现了HTTPSConnectionPool(host=‘huggingface.co‘, port=443)错误的解决方法9.2 种从 Linux 终端下载文件的方法问题描述
- 使用 conda activate 激活虚拟环境时报错:
conda activate virtual_env
- 提示内容
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'.
原因
- 提示内容已经给出原因,当前使用的 shell 没有配置好 conda activate,需要运行 conda init 初始化 shell
- 一般使用 zsh shell 时,首次激活 conda 虚拟环境时会遇到
解决方法
- 方法一:根据提示运行 conda init ,重启 shell 后即可正常使用 conda activate 激活虚拟环境的指令
# 如使用 zsh,则
conda init zsh
# 如果使用 bash,则
conda init bash
- 方法二:首次激活 conda 虚拟环境,可用 source activate 激活(如下),以后就可以正常使用 conda activate 激活虚拟环境了
# 首次使用 source activate 命令激活虚拟环境 my_conda_virutal_environment
source activate my_conda_virutal_environment
# 退出虚拟环境
conda deactivate
# 以后使用 conda activate 命令激活虚拟环境
conda activate my_conda_virutal_environment
来源:https://blog.csdn.net/sdnuwjw/article/details/112448792
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!