服务器报错解决: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

即可。

版权声明:本文为博主作者:fankeYang️原创文章,版权归属原作者,如果侵权,请联系我们删除!

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

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2024年4月10日
下一篇 2024年4月10日

相关推荐