I previously had Conda running smoothly on Mojave, but I've found that the upgrade to Catalina moves the "anaconda3" folder to your Desktop > Relocated Items > Security > anaconda3. It seems Catalina's security settings may not allow applications to install directly under the user directory anymore.
I tried the suggestion here, written below:
Hi, I might have a solution
- Copy the folder anaconda3 located in Relocated Items to /Users/myname/
- Open Terminal
- Enter: export PATH=''/Users/myname/anaconda3/bin:$PATH"
- Enter: conda init zsh
It worked! Good luck!
But this doesn't work for me. After conda init zsh
I get:
-bash: /Users/USER/anaconda3/bin/conda: /anaconda3/bin/python: bad interpreter: No such file or directory
How can I get Conda up and running again without losing all my virtual environments? Thanks!
Update
I got Conda to work following @Ted Shaowang's suggestion. This means that conda env list
shows all the virtual environments created via Conda.
However I am still experiencing an issue with virtualenv
as since I changed the default anaconda3 file locations, python cannot be found.
The python executable located at .virtualenvs/env/bin/python
cannot be found. Do I need to make further changes in order for python to work from virtualenv
too?
It will get installed in the venv/ folder, and not conflict with other projects.
I have the exact same problem and this works for me:
After you move anaconda from "Relocated Items" to ~/anaconda3
, edit the first line of ~/anaconda3/bin/conda
file from #!/anaconda3/bin/python
to #!/Users/USERNAME/anaconda3/bin/python
to reflect the change.
I would probably abstain from using the above solution. That ~/anaconda3/bin
directory has lots of runnables (not just the conda
one) that would need to be altered in this manual way. For example, unless you make the same change you cannot run jupyter notebook
either, neither from base
nor from other envs you might have.
My tip: Try getting a requirements file for your virtual envs, and do a fresh installation. You could use pipreqs
to get the requirements used for individual projects: https://www.idiotinside.com/2015/05/10/python-auto-generate-requirements-txt/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With