Conda not found after upgrading to macOS Catalina

None of the existing answers worked for me but this one does.

  1. Download anaconda's self-contained prefix replacement tool at https://repo.anaconda.com/pkgs/misc/cpr-exec/cpr-0.1.1-osx-64.exe and make it executable:

    curl -L https://repo.anaconda.com/pkgs/misc/cpr-exec/cpr-0.1.1-osx-64.exe -o cpr && chmod +x cpr
    
  2. Move your anaconda3 folder from Relocated Items to your home folder: ~/anaconda3.

  3. Fix your folder using the following command:

    ./cpr rehome ~/anaconda3
    
  4. Re-run conda init to fix your conda shell command:

    source ~/anaconda3/bin/activate
    
    conda init
    

If you are using zsh,replace the last command with:

conda init zsh

You can find the entire anaconda3 environment in a shortcut link named 'Relocated Items' on your desktop. It appears as though the upgrade to Catalina does not allow the Conda environment to be installed under a user directory now likely having to do with the new system volume move to a read-only partition.

This issue has been opened as far back as June 10th, I am a little disappointed that it was not resolved before the Catalina upgrade came around.

There is a solution that appears to work without losing your environment, see this link: https://github.com/ContinuumIO/anaconda-issues/issues/10998#issuecomment-539215005

From the link:

  1. Copy the folder anaconda3 located in Relocated Items to /Users/myname/

  2. Open Terminal

  3. Enter: export PATH='/Users/myname/anaconda3/bin:$PATH'

  4. Enter: conda init zsh


Anaconda has published a blog post on the issue. There seem to be two main options:

  1. Reinstallation: for now shell installer only (you’ll need to wait for the new installer if you rely on the GUI instead).

  2. Repair (experimental): will allow you to fix your old installation and keep all of your old environments

You can check the Anaconda website for further information.