4

I recently upgraded macOS from High Sierra to Big Sur. My Anaconda installation, which was previously installed in /anaconda3 is now broken.

First /anaconda3 is missing; I found it in /System/Volumes/Data/anaconda3. Second, the conda and activate commands do not work because many files in the anaconda3 folder still expect the path to be /anaconda3. For example,

$ /System/Volumes/Data/anaconda3/bin/conda env list
-bash: /System/Volumes/Data/anaconda3/bin/conda: /anaconda3/bin/python: bad interpreter: No such file or directory

What's the solution to get this working on Big Sur? Should I nuke the anaconda3 folder and re-install? If so, can I export the list of environments and packages to re-create them post-install?

Note that a similar issue affecting Catalina users is not identical to this Big Sur issue. If you didn't previously keep anaconda3 under /, you can easily move the anaconda3 directory back to its previous location. If anaconda3 was under /, however, this is not possible because macOS Big Sur doesn't allow the folder to be put back under / even when using sudo.

ChrisP
  • 5,812
  • 1
  • 33
  • 36
  • Does this answer your question? [Conda not found after upgrading to macOS Catalina](https://stackoverflow.com/questions/58291108/conda-not-found-after-upgrading-to-macos-catalina) That is, this sounds identical to the Catalina upgrade issue Anaconda users hit. – merv Jan 11 '21 at 22:12
  • @merv, the issue is similar, but not identical. The Catalina solution applies when `anaconda3` was previously in the home folder. Here, `anaconda3` was previously under `/` and macOS Big Sur doesn't allow the folder to be put back under `/`. – ChrisP Jan 14 '21 at 23:07
  • I think the point is that MacOS 10.15+ doesn’t allow root level folders. And that was the issue that Anaconda team acknowledges in the blog post. Instead, one can move the folder to under user home then use the `cpr` tool to repair dynamic library paths. – merv Jan 14 '21 at 23:17
  • Do check [this out](https://stackoverflow.com/questions/64949574/jupyter-interpreter-permanently-changed/64949909?). This would give you some clarity on how to find out whats going on. – Akshay Sehgal Jan 14 '21 at 23:26
  • @ChrisP Did you manage to find a solution to this issue? I am experiencing the same after updating from Mojave to Big Sur and can't uninstall the folder following instructions elsewhere. – rockdoctor Feb 08 '21 at 22:07
  • @rockdoctor, I never found a good solution. I ended up deleting the old `/System/Volumes/Data/anaconda3` folder (use `sudo` as needed) and re-installing. This worked, but required re-creating my environments. – ChrisP Feb 09 '21 at 07:46

1 Answers1

0

I ran into several problems with conda after upgrading to Big Sur 11.4. I tried many proposed solutions you can find out there but none of them worked.

conda info
conda create --name=name_of_env
conda install whatever_package

All above commands just kept hanging and worked only in safe mode, even after several re-install and reboot actions.

What worked in the end was using pyenv to install anaconda.

pip install pyenv
pyenv install anaconda3-2021.05

After that things worked again.

Dharman
  • 30,962
  • 25
  • 85
  • 135
TMS
  • 21
  • 1