退出 conda base 虚拟环境回到系统环境
1. Deactivating an environment
To deactivate an environment, type: conda deactivate
Conda removes the path name for the currently active environment from your system command.
To simply return to the base environment, it’s better to call conda activate
with no environment specified, rather than to try to deactivate
.
If you run conda deactivate
from your base environment, you may lose the ability to run conda at all. Don’t worry, that’s local to this shell - you can start a new one. However, if the environment was activated using --stack
(or was automatically stacked) then it is better to use conda deactivate
.
conda activate
and conda deactivate
only work on conda 4.6 and later versions.
For conda versions prior to 4.6, run:
- Windows:
activate
ordeactivate
- Linux and macOS:
source activate
orsource deactivate
退出与进入虚拟环境 conda base.
(base) yongqiang@famu-sys:~$ conda deactivate
yongqiang@famu-sys:~$
yongqiang@famu-sys:~$ conda activate
(base) yongqiang@famu-sys:~$
(base) yongqiang@famu-sys:~$ conda deactivate
yongqiang@famu-sys:~$
References
[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/
[2] Managing environments, https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html