Reputation: 11
I installed Anaconda on a new Mac with macOS Catalina, but when I run Conda install commands, conda
is not found
zsh: command not found: conda
I did some research and installed from .sh according to this Anaconda blog post but it still failed on me.
Upvotes: 1
Views: 2718
Reputation: 31
If you are still using bash as your terminal you need to know the location of two files. The first is your .bash_profile and the second is the location of the Conda application. For me, using OSX Catalina, the Conda application is located in
/usr/local/anaconda3/condabin
You could check to see where they are doing the following:
Open Terminal:
You should be able to see your .bash_profile there using:
ls -la
Your .bash_profile should be in this home directory, which is normally opened up with terminal.
cd /usr/local/anaconda3/condabin/
Should be the location of your Conda Application. If it is not there you may have to grep for it. That is how I found it. Using:
egrep --color -R 'conda' *
and then going through the list.
use a program like vi or gedit and update your .bash_profile to include a new path. Open it and add the following:
export PATH=/usr/local/anaconda3/condabin/:$PATH
or
export PATH=/<Folder that contains Conda>/:$PATH
If this does not work for you please see:
https://github.com/ContinuumIO/anaconda-issues/issues/10998
Upvotes: 0
Reputation: 536
I had the same problem and it took me a bit of searching around to find the correct sequence of steps. Since my default shell was already zsh, I had to open a bash shell to run conda init zsh
.
Check out https://support.apple.com/en-us/HT208050 and follow the steps in How to use a different shell without changing the default
Once I figured that out and changed Terminal back to use the default shell conda
worked.
Upvotes: 1
Reputation: 1019
Initialize conda for your shell (as opposed to sourcing bash profile from inside zsh):
conda init zsh
This should add the relevant lines to your zshrc.
Upvotes: 0
Reputation: 46
I had the same problem. I solved creating a .zshrc file on Users/my_user/
You can use nano on your terminal to do that nano ~/.zshrc
then add a reference to your .bash_profile where you have your conda path source ~/.bash_profile
. That worked for me.
Apparently macOs Catalina uses zsh instead bash. You can find some info in the next link: Why does MacOS Catalina use Zsh instead of Bash?
Upvotes: 0