Reputation: 3412
I've just updated my MacBook to Catalina. After the update, zsh can't find anymore. In fact, in my .zshrc I had:
export PATH=/anaconda3/bin:$PATH
However, the path /anaconda3/bin doesn't exist anymore. Does that mean that I have lost all of my environment?
Upvotes: 27
Views: 34874
Reputation: 323
This Commands works for me :
$ export PATH='/opt/anaconda2/bin:$PATH'
$ conda init zsh
Upvotes: 0
Reputation: 604
There is now a fix from anaconda.
Another key change since the last release is that Apple released macOS version 10.15 – Catalina. Unfortunately, this was a breaking release for previous versions of Anaconda that used the pkg installer. The Anaconda Distribution 2019.10 installers address the issues and should install without trouble on macOS Catalina. If you would rather repair your current Anaconda installation, please check out this blog post for tips.
https://www.anaconda.com/anaconda-distribution-2019-10/
conda -V
jupyter notebook
Everything worked perfectly for me, no need to change paths or anything.
Upvotes: 2
Reputation: 76
Copy anaconda3/ path to /Users/<my_user>/
Then export PATH='/Users/<my_user>/anaconda3/bin:$PATH'
Edit file:
/Users/<my_user>/anaconda3/conda
Edit the first line like:
FROM #!//anaconda3/bin/python
TO #!/Users/<my_user>/anaconda3/bin/python
Save changes to /Users/<my_user>/anaconda3/bin/conda init zsh
Should work
Upvotes: 3
Reputation: 426
None of the existing answers worked for me but this one does.
Download anaconda's self-contained prefix replacement tool at https://repo.anaconda.com/pkgs/misc/cpr-exec/cpr-0.1.1-osx-64.exe and make it executable:
curl -L https://repo.anaconda.com/pkgs/misc/cpr-exec/cpr-0.1.1-osx-64.exe -o cpr && chmod +x cpr
Move your anaconda3 folder from Relocated Items to your home folder: ~/anaconda3.
Fix your folder using the following command:
./cpr rehome ~/anaconda3
Re-run conda init to fix your conda shell command:
source ~/anaconda3/bin/activate
conda init
If you are using zsh,replace the last command with:
conda init zsh
Upvotes: 6
Reputation: 1
I installed the anaconda successfully through command mode, still was not running.
So, conda was installed but not activated.
(in terminal; activation needs to run successfully)
(needs to run without any error)
(this will activate conda automatically to run conda)
This also solved another problem - my spyder was not running from navigator. Now it's running fine.
If it does not work, let me know.
Upvotes: 0
Reputation: 732
I followed this post and it worked (I did it for python 3). Summary of steps:
Relocated Items
to you homechmod +x
)Run the installer with the -u
option to upgrade an existing Anaconda installation:
./<name of anaconda installer> -u
add this line to your .bash_profile
:
export PATH="/Users/<username>/anaconda3/bin:$PATH"
Upvotes: 0
Reputation: 2642
If you are using zsh
, conda installer adds a conda init script at the end of your ~/.bash_profile
file. You should copy it and paste into your ~/.zshrc
file.
Upvotes: 3
Reputation: 21
use this (do not use double " )
export PATH='/Users/myname/anaconda3/bin:$PATH'
Upvotes: 2
Reputation:
You can find the entire anaconda3 environment in a shortcut link named 'Relocated Items' on your desktop. It appears as though the upgrade to Catalina does not allow the Conda environment to be installed under a user directory now likely having to do with the new system volume move to a read-only partition.
This issue has been opened as far back as June 10th, I am a little disappointed that it was not resolved before the Catalina upgrade came around.
There is a solution that appears to work without losing your environment, see this link: https://github.com/ContinuumIO/anaconda-issues/issues/10998#issuecomment-539215005
From the link:
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
Upvotes: 40
Reputation: 586
Anaconda has published a blog post on the issue. There seem to be two main options:
Reinstallation: for now shell installer only (you’ll need to wait for the new installer if you rely on the GUI instead).
Repair (experimental): will allow you to fix your old installation and keep all of your old environments
You can check the Anaconda website for further information.
Upvotes: 10
Reputation: 156
I was able to develop a workaround for this issue by installing miniconda from Homebrew (https://brew.sh/). After installing Homebrew, type the following into Terminal:
brew cask install miniconda
Once miniconda is installed, conda commands should be accessible through Terminal and you may also want to run conda update conda
to ensure the packages in your environment are consistent.
Finally, you may have to change your approach to opening Anaconda tools such as Jupyter Notebook. Such tools can be accessed via Terminal with the prefix conda run ...
For example:
conda run jupyter notebook
will open Jupyter Notebook, but the command
jupyter notebook
might not work. A similar question was asked on this post.
Upvotes: 1