Reputation: 155
I have downloaded and compiled Python 2.7.12 into my $HOME directory on a Linux server.
Presently, I am having trouble setting that version of python into my local path and to be the default version even though I have now added a reference in my .bash_profile. See attached.
When I
which python
I see that I am directed to the default 2.6 installation in /usr/bin/python.
Any ideas what I am doing wrong? Do you need more information?
Thanks in advance!
Upvotes: 0
Views: 313
Reputation: 937
When you do PATH=$PATH:$HOME/bin
, you're adding $HOME/bin
to the end of your PATH
variable (so it's the last place that is checked). If you want this python to be the priority, you need to add it to the beginning of your PATH
:
PATH=$HOME/bin:$PATH
Upvotes: 2