Fixing Anaconda Python after Big Sur update

Viewed 2793

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.

1 Answers

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.

Related