📅  最后修改于: 2023-12-03 15:14:14.104000             🧑  作者: Mango
Conda is a popular package manager in the Python community that allows for easy installation and management of packages and environments. However, one issue that some users face is Conda's auto-activation feature, which automatically activates a Conda environment when a new terminal window is opened.
This can sometimes be unwanted or cause conflicts with other tools, so Conda provides an option to disable this auto-activation feature by setting the auto_activate_base
configuration option to false
. This can be done in the terminal by running the following command:
conda config --set auto_activate_base false
This will disable the auto-activation feature for the base
environment. If you want to disable it for all environments, you can set the activate
option instead:
conda config --set activate false
After running either of these commands, Conda will no longer automatically activate any environment when a new terminal window is opened. You can manually activate an environment using the conda activate
command as needed.
It's worth noting that the auto_activate_base
and activate
configuration options can also be set globally in your Conda configuration file, which is usually located at ~/.condarc
. Simply add the following lines to the file:
auto_activate_base: false
# OR
activate: false
This will have the same effect as running the conda config
command in the terminal.
Overall, the ability to disable Conda's auto-activation feature can be helpful for some users who prefer more control over their environment management. With this knowledge, shell/Bash programmers can easily disable this feature and achieve their desired outcome.