Reputation: 233
I have installed anaconda in my Linux to import python packages.
After installed anaconda, I could't use anaconda in python and after some search I found that typing this command I was abled to use conda packages:
export PATH=~/anaconda3/bin:$PATH
Would I like to understand exactly why do I have to do that? And would I like to know if is there a way to turn by default my python with anaconda packages.
Upvotes: 1
Views: 3958
Reputation: 531075
If you just type ls
at the command line, how does the shell know whether you want to run /bin/ls
, or /usr/bin/ls
, or ~/bin/ls
? It doesn't; it simply looks at the directories stored in your PATH
variable, one at a time, and executes the first ls
that it finds.
Adding ~/anaconda3/bin
to the front of your path ensures that when you type, say, pyflakes
or python
at your prompt, you will run ~/anaconda3/bin/pyflakes
or ~/anaconda3/bin/python
instead of generating a "command not found" error or running /usr/bin/pyflakes
or /usr/bin/python
instead.
Upvotes: 1