1

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.

merv
  • 67,214
  • 13
  • 180
  • 245
Tedy g
  • 11
  • 2
  • 1
    Duplicate: [How to run Conda?](https://stackoverflow.com/questions/18675907/how-to-run-conda) Specifically see [this answer](https://stackoverflow.com/a/55526573/570918). – merv Nov 26 '19 at 03:14

4 Answers4

1

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.

Community
  • 1
  • 1
mkubal
  • 536
  • 5
  • 4
0

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?

0

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.

adrianp
  • 999
  • 1
  • 8
  • 13
0

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:

Searches everywhere

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