EngineeringConda

How to Stop Conda Activating the Base Environment Automatically

Conda was slowing my machine down, so I stopped it from activating the base environment in every new shell.

Kushan Manahara

March 12, 2023 · 1 min read

0728
How to Stop Conda Activating the Base Environment Automatically

I was getting slow performance on my PC when using Conda, so I looked at disabling the automatic activation of the base environment on Kali. It takes one command.

terminal.sh
conda config --set auto_activate_base false

What that does, piece by piece:

  • conda config modifies Conda configuration settings.
  • --set sets a configuration variable to a specific value.
  • auto_activate_base determines whether Conda automatically activates the base environment when a new shell is opened. It defaults to true.

Setting it to false disables that, which reduces the resources Conda uses on shell startup and helps with the sluggishness. If you need the base environment for a particular task, you can still activate it by hand with conda activate.

Where the setting lives

The command writes to ~/.condarc, which is a plain YAML file. You can edit it directly, and you can read it back to confirm the change took:

terminal.sh
conda config --show auto_activate_base
cat ~/.condarc

Open a new shell afterwards. The change applies to shells started after it, not the one you are sitting in.

So on a current install the same change is:

terminal.sh
conda config --set auto_activate false

Either way the effect is the same. Your shell opens without conda getting involved, and you opt in when you actually want an environment.

Written by

Kushan Manahara

Responses (0)

Verified name, role, and email required before posting.

No responses yet

Be the first to share your thoughts, benchmarks, or feedback above.