服务器报错解决:CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.T

在一个新的服务器端口创建完虚拟环境后,显示报错信息

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 的名称。

在你的情况下,提示中提到支持的 shell 有 bash、fish、tcsh、xonsh、zsh、powershell。因此,你可以运行以下命令:

conda init bash
运行完这句代码后,重新启动你的shell,问题解决。

然后输入:

conda activate XXXX
即可。
————————————————

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

原文链接:https://blog.csdn.net/m0_65168503/article/details/134677036

版权声明:
作者:gaihaoyu
链接:https://www.cnesa.cn/1059.html
来源:正群欣世
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>