Conda Command Not Found


Answer :

If you're using zsh and it has not been set up to read .bashrc, you need to add the Miniconda directory to the zsh shell PATH environment variable. Add this to your .zshrc:



export PATH="/home/username/miniconda/bin:$PATH"


Make sure to replace /home/username/miniconda with your actual path.



Save, exit the terminal and then reopen the terminal. conda command should work.



If you have the PATH in your .bashrc file and are still getting



conda: command not found


Your terminal might not be looking for the bash file.
Type
bash in the terminal to insure you are in bash and then try:
conda --version



For those experiencing issues after upgrading to MacOS Catalina.



Short version:



# 1a) Use tool: conda-prefix-replacement - 
# Restores: Desktop -> Relocated Items -> Security -> anaconda3
curl -L https://repo.anaconda.com/pkgs/misc/cpr-exec/cpr-0.1.1-osx-64.exe -o cpr && chmod +x cpr
./cpr rehome ~/anaconda3
# or if fails
#./cpr rehome ~/anaconda3 --old-prefix /Anaconda3
source ~/anaconda3/bin/activate

# 1b) Alternatively - reintall anaconda -
# brew cask install anaconda

# 2) conda init
conda init zsh
# or
# conda init


Further reading - Anaconda blog post and Github discussion.



Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable