conda activate和source activate 区别,以及使用出现的问题

上网查找了一下,发现是版本更新后出现的两条指令,现在使用conda activate激活环境更方便
原文:
conda activate: The logic and mechanisms underlying environment activation have been reworked. With conda 4.4, conda activate and conda deactivate are now the preferred commands for activating and deactivating environments. You’ll find they are much more snappy than the source activate and source deactivate commands from previous conda versions. The conda activate command also has advantages of (1) being universal across all OSes, shells, and platforms, and (2) not having path collisions with scripts from other packages like python virtualenv’s activate script.
翻译:
conda activate:环境激活的逻辑和机制已经被重新设计。在conda4.4中,condaactivate和condadeactivate现在是激活和停用环境的首选命令。您会发现它们比以前conda版本中的source activate和source deactivate命令要快得多。condaactivate命令还有以下优点:(1)在所有操作系统、shell和平台上都是通用的;(2)与来自其他包(如pythonvirtualenv的activate脚本)的脚本没有路径冲突。

顺便提一句,我在使用中出现了如下问题:
报错:CommandNotFoundError: Your shell has not been properly configured to use 'conda deactivate'.
原因是我上一次使用了source activate激活环境后,直接关闭了终端窗口,没有使用source deactivate 退出,因此现在不能使用conda activate 激活我想用的环境,因此只能先执行source deactivate或者conda deactivate(最好两个指令都依次试一下,很玄学),接着就能从新使用source activate命令啦

你可能感兴趣的:(深度学习,anaconda)