Anaconda not working in Mac Catalina

1

After updating Mac OS to Catalina, Anaconda stopped working. Using terminal window to open Anaconda-Navigator.app, it gives the following error

failed with error -10810 for the file ../Anaconda-Navigator.app

Not sure if this is a permission or a an incompatibility issue.

Any advice is welcome

Manuel Costa

Posted 2019-07-05T13:30:27.303

Reputation: 11

Answers

1

The reason why this happen is because Anaconda3 is installed under / by default. While the new version of MacOS - Mac Catalina - won't allow that. So the whole folder has been moved to .../Relocated Items/Security/.

All we have to do is moving them back with some little tricks in it:

  1. Move the folder to ~ i.e. /Users/[your_user_name] since it can't be moved back to root dir, i.e., /. It's gonna take a while.

  2. Open Terminal, go to /Users/[your_user_name]/anaconda3/bin/.

  3. Type vim conda and press Enter. Change the first line from #!/anaconda3/bin/python to #!/Users/[your_user_name]/anaconda3/bin/python. Then save it and quit. (If you're not familiar with VIM, use any Editior you want.)

  4. Type conda init zsh and press Enter. (In my case it's zsh, change to bash, dash or sh due to your current environment.)

And you'll get this:

➜  ~ conda init zsh
modified      /Users/[your_user_name]/anaconda3/condabin/conda
no change     /Users/[your_user_name]/anaconda3/bin/conda
modified      /Users/[your_user_name]/anaconda3/bin/conda-env
modified      /Users/[your_user_name]/anaconda3/bin/activate
modified      /Users/[your_user_name]/anaconda3/bin/deactivate
modified      /Users/[your_user_name]/anaconda3/etc/profile.d/conda.sh
modified      /Users/[your_user_name]/anaconda3/etc/fish/conf.d/conda.fish
no change     /Users/[your_user_name]/anaconda3/shell/condabin/Conda.psm1
modified      /Users/[your_user_name]/anaconda3/shell/condabin/conda-hook.ps1
modified      /Users/[your_user_name]/anaconda3/lib/python3.6/site-packages/xontrib/conda.xsh
modified      /Users/[your_user_name]/anaconda3/etc/profile.d/conda.csh
modified      /Users/[your_user_name]/.zshrc

==> For changes to take effect, close and re-open your current shell. <==

➜  ~

Now you can use your whole anaconda3 environment in command line. (Don't forget to add the new home of anaconda3 to your shell init config file. In my case, it's to add export PATH=/Users/[your_user_name]/anaconda3/bin:$PATH to ~/.zshrc.)

The last step is to make your Anaconda-Navigator.app work safe and sound.

  1. Go to /Users/[your_user_name]/anaconda3/, right click Anaconda-Navigator.app and choose show package contents or something like that.

  2. Go on, find Contents/MacOS/run.sh and open it with your favorite editor, change all the /anaconda3 to /Users/[your_user_name]/anaconda3.

Finally, you can open your Anaconda-Navigator.app as usual. (You might need a reboot to make it work.)

=================================

If you still get an error, we might use the last but not least weapon:

conda install -c anaconda anaconda-navigator
conda update update

This will check your current anaconda environment and find whatever it needs to repair. Considering we already have the nearly whole environment, it should only take a bit of download.

Done! Good luck!

Ninetyn Percent

Posted 2019-07-05T13:30:27.303

Reputation: 11

1This fix is insufficient for many users. There are what appear to be thousands of files in my /anaconda3 directory (e.g. in /anaconda3/envs/) that point to /anaconda3/xyz that need to be edited to point to /Users/me/anaconda3. – Metropolis – 2019-10-09T20:19:06.960

did you mean conda update conda? – Yoav Vollansky – 2019-11-24T23:24:33.520

1

I answered this question earlier here. I'd just say rather go for a reinstall than modifying the conda file in the /bin folder. (unless you plan on modifying every single file in that folder)

If you try other commands like jupyter notebook or similar commands from base or from local environments, nothing will work.

Cristina Morariu

Posted 2019-07-05T13:30:27.303

Reputation: 111

0

The command-line version works. Saw it here: https://github.com/ContinuumIO/anaconda-issues/issues/10998#issuecomment-500746370 and installed myself. Works for me.

Ashwin Manghat

Posted 2019-07-05T13:30:27.303

Reputation: 1

0

Maybe your anaconda folder is moved to /Users/Shared/Relocated Items/Security/anaconda3 from /anaconda3 by security reason of Catalina.

Relocate the folder Anaconda to the original location or set the other proper location such as ~/anaconda3 or /Users/yourname/anaconda3


And change the path setting of this file /Users/yourname/anaconda3/conda

from

#!/anaconda3/bin/python

to

#!/Users/yourname/anaconda3/bin/python

and modify .bash_profile

from

export PATH="/anaconda3/bin:$PATH"

to

export PATH="/Users/yourname/anaconda3/bin:$PATH"


Now you are ready to command an initialization

$ conda init bash

If you have a CommandNotFoundError: No command 'conda init bash', then upgrade the conda version.

$ conda install -c anaconda anaconda-navigator

Do it one more time,

$ conda init bash

no change     /Users/yourname/anaconda3/condabin/conda
no change     /Users/yourname/anaconda3/bin/conda
no change     /Users/yourname/anaconda3/bin/conda-env
no change     /Users/yourname/anaconda3/bin/activate
no change     /Users/yourname/anaconda3/bin/deactivate
no change     /Users/yourname/anaconda3/etc/profile.d/conda.sh
no change     /Users/yourname/anaconda3/etc/fish/conf.d/conda.fish
no change     /Users/yourname/anaconda3/shell/condabin/Conda.psm1
no change     /Users/yourname/anaconda3/shell/condabin/conda-hook.ps1
no change     /Users/yourname/anaconda3/lib/python3.6/site-packages/xontrib/conda.xsh
no change     /Users/yourname/anaconda3/etc/profile.d/conda.csh
modified      /Users/yourname/.bash_profile

==> For changes to take effect, close and re-open your current shell. <==

That's all.

Refer this issue https://github.com/ContinuumIO/anaconda-issues/issues/10998

KyungHoon Kim

Posted 2019-07-05T13:30:27.303

Reputation: 101