5

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?

2 Answers2

8

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"
steeldriver
  • 142,475
1

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

source bin/activate ~/anaconda3/

Paul
  • 11