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

| improve this question | | | | |
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!

| improve this answer | | | | |
  • 1
    This 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 Oct 9 '19 at 20:19
  • did you mean conda update conda? – Yoav Vollansky Nov 24 '19 at 23:24
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.

| improve this answer | | | | |
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.

| improve this answer | | | | |
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

| improve this answer | | | | |
0

I can run anaconda-navigator from launchpad. It isn't loaded into the main executable directory. I found it anaconda-navigator and the other related files as follows:

1) Run Launchpad. Select anaconda-navigator from the list

2) Place a shortcut to Anaconda Navigator on the menu bar

3) Select "show in finder."

4) Point to it in finder and press Option-Command C to copy the path

4) Open the Finder. Select Go - Go to and key in the path

It is locate /opt

/opt/anaconda2/Anaconda-Navigator.app

Underneath this are all the conda commands etc.

( I installed Anaconda2 because even with Catalina, it still comes with Python 2.7 for some reason and I just bought my new Mac only 2 weeks ago.)

By the way this doesn't seem to work

find . -name "Relocated*" > ~/filelist.txt

(But not before it went through a half dozen "terminal would like to access X" questions).

Now I just need to find the Mac Catalina correct way to add the subdirectories under /opt/anacondaX to the path.

| improve this answer | | | | |
0

Disclaimer

I used Anaconda mainly because of jupyter notebook and python version management. After old Anaconda installation is broken in Catalina, I read a lot of posts and finally I decided to switch to pyenv+pipenv for version management and install the jupyter notebook from shell

But in case anyone who still need to get old Anaconda back, this might be helpful

This medium post is very helpful and points me to the official solution for this problem. It comes in two flavors, a new installation or a repair.

For the first method, the only thing you need to make sure is that Anaconda is not installed on your root folder, but somewhere else. The installation path should look like

/Users/<YOUR_USERNAME>/anaconda3.

Second, to repair old Anaconda. Unfortunately, it is not so simple and it requires you to download a tool from the page of official solution and follow many steps to get your old Anaconda back. At the end, you may still need to manually fix some broken references.

So I guess, if you could install a new Anaconda, it will save you some headache from shuffling files around.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.