After installing Anaconda
on Mac, I configured the environment variable configuration method found online, but I still kept getting an error that conda
could not be found.
I entered the Anaconda
directory in the terminal:
cd /anaconda
pwd # /anaconda
source ./bin/activate
# 这样就可以使用 conda 了
conda -V
But when I want to use conda
, I can’t execute the following two commands first every time:
cd /anaconda
source ./bin/activate
I tried configuring source like this in .zshrc but it still didn’t work:
export PATH=”/anaconda/bin:$PATH”
How to configure the environment variables in this case? Trouble.
阿神2017-05-16 13:35:14
Environment variables should be written in /etc/profile, add
in frontexport PATH=”/anaconda/bin:$PATH”
Then enter
source /etc/profile
That’s it. If you only write it in the configuration files of bash and zsh, there may still be errors when calling this PATH in some places.
天蓬老师2017-05-16 13:35:14
Just configure the environment face change in ~/.bash_profile
No need to configure it in .zshrc
Once the configuration is complete, use source ~/.bash_profile to process the input to make it effective