linux - python installation Anaconda environment variables problem to ask
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-16 13:33:14
0
2
807

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.

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(2)
阿神

Environment variables should be written in /etc/profile, add

in front
export 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.

Peter_Zhu

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template