CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate’.简单解决方案(这种错误有时候突然出现,有时候自动消失,此所谓突然抽风)

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案_第1张图片

一、错误的理解,首先对应错误的直接翻译如下,其实就是指令没找到,出现错误。

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
If using 'conda activate' from a batch script, change your
invocation to 'CALL conda.bat activate'.
CommandNotFoundError:您的shell未正确配置为使用“conda activate”。
如果从批处理脚本中使用“conda activate”,请更改
调用“CALL conda.bat activate”。

二、那么要么是conda环境安装有问题,要么是没有在conda的环境下去使用“conda activate”这个命令,所以才命令找不到然后无效。安装一般是没有问题的,那么在shell环境下应该要先启动conda的base环境。

activate

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案_第2张图片

三、上一步完成启动成功之后就可以正常按照conda的命令操作并且不会报CommandNotFoundError的错了。

conda activate 虚拟环境(博主举例dgl)

CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.简单解决方案_第3张图片

你可能感兴趣的:(人工智能,conda,python,shell,虚拟环境,anaconda)