I have installed Anaconda, but every time I open Terminal I have to go give the command:
export PATH=~/anaconda3/bin:$PATH
How can I fix this issue?
I have installed Anaconda, but every time I open Terminal I have to go give the command:
export PATH=~/anaconda3/bin:$PATH
How can I fix this issue?
You can make sure that command is executed for every terminal (meaning Anaconda will be found) by adding it to your user's bash profile.
Open a terminal and follow these steps:
open the terminal profile: gedit ~/.bashrc
at the end of the file, add: export PATH=~/anaconda3/bin:$PATH
save the file (control+s
) and close it
load the changed profile: source ~/.bashrc
Now this terminal window (and any new ones) should find Anaconda! See which version of Python is now the default, using which -a python
. First in the list should be something like /home/username/anaconda3/bin/python
The Anaconda setup/installation usually asks you if you want to prepend Anaconda to start of your path, so whoever installed it must have said no or skipped that step.
Write your command in your .bashrc
(access at ~/.bashrc
)
It will be executed each time you call a terminal.