2

My problem: when opening a MacOS terminal, (base) environment is missing. I'm trying to get (base) back so I can do conda activate <another venv>. But, it says zsh: command not found: conda. Alternatively, I could go back to Anaconda Navigator or VS code to open terminal via the respective venvs, but that's too much of a trouble sometimes.

Back-tracking a little: (base) disappeared when I accidentally did a conda deactivate while in (base) environment.

I've tried various solutions on a new terminal like:

source /Users/username/opt/anaconda3/etc/profile.d/conda.sh

or even replicating what happens in VS code:

source /Users/username/opt/anaconda3/bin/activate

which both works great to get (base) back in the current terminal, but (base) disappears again when I open a new terminal.

Also tried:

conda config --set auto_activate_base true

while in (base) env but seems like nothing happened.

Could someone please guide me on how to change PATH etc so I don't have to repeatedly type the lines above every time I open a new terminal?


Additional Info

conda info Output

Conda info output

merv
  • 67,214
  • 13
  • 180
  • 245
  • Please check `conda info` to verify active environment. This can happen independently of PS1 change (e.g., adding `(base)` to the shell line). What is the value of `conda config --show changeps1`? – merv Jul 06 '21 at 17:52
  • hi @merv, please see reply below as I can't attach image here and its too long to type here. – user16296161 Jul 07 '21 at 02:14
  • You need to run `/Users/username/opt/anaconda3/condabin/conda init zsh`, in order for Conda to be initialized automatically when opening new `zsh` sessions. Closing as duplicate. – merv Jul 07 '21 at 19:04

0 Answers0