So I installed Anaconda and everything is working. After I installed it I decided to switch to oh-my-zsh
. I am now getting:
zsh
If you are on macOS Catalina, the new default shell is zsh. You will need to run source /bin/activate followed by conda init zsh.
For example: I installed anaconda python 3.7 Version, type echo $USER
to find username
source /Users/my_username/opt/anaconda3/bin/activate
Follow by
conda init zsh
or (for bash shell)
conda init
Check working:
conda list
The error will be fixed.
Find the right version of your anaconda
Put it to ~/.zshrc
via command vim ~/.zshrc
export PATH="/User/<your-username>/anaconda2/bin:$PATH"
export PATH="/User/<your-username>/anaconda3/bin:$PATH"
export PATH="/anaconda2/bin:$PATH"
export PATH="/anaconda3/bin:$PATH"
Restart the zsh source ~/.zshrc
So I discovered that in your ~/.zshrc file, there was a commented line,
# If you come from bash you might have to change your $PATH
# export PATH=$HOME/bin:/usr/local/bin:$PATH
Just uncomment the export statement and all your previous bash_profile commands will also be there. If that comment does not exist, you can also just add that export statement to .zshrc file.
None of these solutions worked for me. I had to append bash
environment to the zsh
:
echo 'source ~/.bash_profile' >> ~/.zshrc
If anaconda is fully updated, a simple "conda init zsh" should work. Navigate into the anaconda3 folder using
cd /path/to/anaconda3/
of course replacing "/path/to/anaconda/" with "~/anaconda3" or "/anaconda3" or wherever the "anaconda3" folder is kept.
To make sure it's updated, run
./bin/conda update --prefix . anaconda
After this, running
./bin/conda init zsh
(or whatever shell you're using) will finish the job cleanly.
MAC OS Users:
brew install anaconda
export PATH="/usr/local/anaconda3/bin:$PATH"
to top of ~/.zshrc
source ~/.zshrc
OR restart terminalTest it. Bingo Bango.