I installed Anaconda using instructions provided on the main website, which are similar to those that can be seen here: How to install Anaconda on Ubuntu?

However, I found that I had to manually change PATH using an export command in ~/.profile (as per official Ubuntu instructions: https://help.ubuntu.com/community/EnvironmentVariables) to get the system to know about ~/anaconda/bin:

export PATH="/usr/local/texlive/2014/bin/x86_64-linux:$PATH"
export PATH="~/anaconda/bin:$PATH"

Already, this was surprising because Anaconda should have been able to sort things out correctly itself during installation.

Now, another issue I am having is that when I run python in terminal, it defaults to using the Python in /usr/lib/python..., rather than ~/anaconda/bin/python.

How do I fix this?

  • Did you login again after changing the profile?
    – muru
    Mar 21, 2015 at 4:33
  • @muru Yes. That was an instruction in the official instructions too. I'd like to note that commands like conda (which are in ~/anaconda/bin) work just fine in the terminal, so the export commands are fine. The issue is that /usr/lib/python command is overriding ~/anaconda/bin/python, and I don't know why.
    – user390136
    Mar 21, 2015 at 4:38
  • did you check your bashrc isn't overriding your profile? Mar 21, 2015 at 4:53
  • 1
    @Chan-HoSuh How could I make sure that that isn't happening?
    – user390136
    Mar 21, 2015 at 4:55
  • The issue may be that the tilde character doesn't get expanded when inside quotes (even double quotes) - have you tried replacing ~ by $HOME? Mar 21, 2015 at 11:22

2 Answers 2


The tilde (~) character is not expanded when enclosed in quotes (even double quotes, which allow most other filename expansions). You should replace ~ by $HOME in the PATH export:

export PATH="/usr/local/texlive/2014/bin/x86_64-linux:$PATH"
export PATH="$HOME/anaconda/bin:$PATH"

I faced the same issue. Tried this and it works for me

source bin/activate ~/anaconda3/

You must log in to answer this question.