0

Currently on a MacOS Catalina 10.15.7

Not knowing what I was doing I accidentally installed Anaconda3 over my Miniconda, making it so I could not longer use my old environments. So I removed my Anaconda3 folder, and tried to manually change my .bash_profile script so that all paths pointing at Anaconda3 were now pointing at my old Miniconda folder.

However, when I closed the terminal and restarted it, after deleting the Anaconda3 and changing the bash file, I noticed I was in zsh. So after a lot of trial and error, I got conda to start working again by initializing it this way:

~/miniconda/bin/conda init zsh

However, the fact that Anaconda3 had modified my .bash_profile shell script suggests that it set my system to use bash instead of zsh. Having never conceptualized that there were different shell scripts before today, I did not examine this beforehand. I wonder if manually changing my shell to bash, would have been an alternative to initializing it on zsh and if that would be more desirable? Why would conda have automatically used bash vs zsh?

Conda documentation suggests that if initializing manually on my computer you can initialize on zsh which further confuses me as to why it would have changed my default shell to bash in the first place?

Maybe I will try it myself later and post my finding here if I dare mess with it further. Much of this is brand new to me, and I have already tried to do a ton of research, but can't seem to find info about this in particular.

  • Welcome to Stack Overflow, unfortunately product recommendation questions are off-topic on Stack Overflow as they are opinion-based. Likewise, justification for choices made by others is opinion-based, and thus off-topic here. Check out the [help] for more information. – TylerH Apr 04 '22 at 18:05
  • How do you open a shell? I.e., what terminal application (e.g., macOS Terminal)? Were you perhaps using Anaconda Prompt instead of your regular terminal? – merv Apr 04 '22 at 22:41
  • Conda certainly does not issue a `chsh` command, but your login shell may have changed by other reason (did you update your MacOS recently?). If you suspect that you have the wrong login shell, you can do a `chsh -s bash` to ensure that it is bash. – user1934428 Apr 05 '22 at 10:21
  • @merv I open the shell with MacOS Terminal. OS Catalina apparently defaults to using zsh automatically, and I never knowingly switched the terminal shell. Yet it seems to me that conda was initialized in bash not zsh, and that upon removing anaconda, my shell switched back to zsh. – Alexander Audet Apr 05 '22 at 23:07

1 Answers1

1

No, it does not change your default shell.

merv
  • 67,214
  • 13
  • 180
  • 245
  • This may very well be the answer, yet I am unsure why anaconda3 was initialized in .bash_profile. At any rate, seems like this may be a mystery that will not be answered here. – Alexander Audet Apr 05 '22 at 23:09