So I installed Anaconda and everything is working. After I installed it I decided to switch to oh-my-zsh
. I am now getting:
zsh
Simply copy your Anaconda bin
directory and paste it at the bottom of ~/.zshrc
.
For me the path is /home/theorangeguy/miniconda3/bin
, so I ran:
echo ". /home/theorangeguy/miniconda3/bin" >> ~/.zshrc
This edited the ~/.zshrc
. Now do:
source ~/.zshrc
It worked like a charm.
I just ran into the same problem. As implicitly stated inside the .zshrc-file (in your user-root-folder), you need to migrate the pathes you've already inserted in your .bash_profile, bashrc or so to resolve this.
Copying all additional pathes from .bash_profile to .zshrc fixed it for me, cause zsh now knows where to look.
#add path to Anaconda-bin
export PATH="/Users/YOURUSERNAME!!/anaconda3/bin:$PATH"
#N.B. for miniconda use
export PATH="/Users/YOURUSERNAME!!!/miniconda3/bin:$PATH"
Depending on where you installed anaconda this path might be different.
this solved it for me, and is sure to work add this to ~/.zshrc
export PATH=path_to_anaconda_bin:$PATH
the answer
It appears that my PATH is broken in my .zshrc
file.
Open it and add :
export PATH="$PATH;/Users/Dz/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/Dz/.rvm/bin"
Doh! Well that would explain everything. How did I miss that little semicolon? Changed:
export PATH="$PATH:/Users/Dz/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/Dz/.rvm/bin"
source ~/.zshrc
echo $HOME
echo $PATH
We're good now.
You should do the following:
1. /home/$USER/anaconda/bin/conda init zsh
(or /home/$USER/miniconda3/bin/conda init zsh
if you use miniconda)
2. source ~/.zshrc
(or just reopen terminal)
Why this answer is better than others?
~/.bash_profile
doesn't exist (my case, only ~/.bashrc
)~/.bash_profile
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" if [ $? -eq 0 ]; then
\eval "$__conda_setup" else
if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then
. "/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/anaconda3/bin:$PATH"
fi fi unset __conda_setup
# <<< conda init <<<