I have installed the Anaconda for Mac, but there is something wrong with me:
when I type the commandwhich conda
or which ipython
, I get conda not found
and ipython not find
Then I find this command export PATH=~/anaconda/bin:"$PATH"
works for me. It solves the problem above, but everytime I rerun the terminal the problem is still there, I have to type it again.
so I want to find a way to solve the problem fundamentally
I have tried to add it into the ~/.bashrc
, ~/.profile
, ~/.bash_profile
, but these don't work for me.
For your very first one: Don't add anaconda to the PATH manually, but use conda init <shell-name> , for you probably conda init zsh . If conda cannot be found, use the full path. /Users/opt/<my_username>/anaconda3/bin/conda init zsh . Afterwards restart the shell. @cel That worked, thanks!
I opened the Anaconda Navigator program. I clicked on "Environments." Under the working environment, I clicked the right arrow and one of the options was "Open Terminal." When the terminal opened using this sequence, I was able to use the conda commands.
Try this in .bash_profile
export PATH="$HOME/anaconda/bin:$PATH"
Then try launching a new terminal and running:
echo $PATH
The output should start with /anaconda/bin:
If that still doesn't work... A work around might be to invoke bash after running terminal i.e. type "bash". Which should cause bash to launch with .bash_profile
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