Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I tried to install the python 2.7.3 on Linux box and then created alias in my local .bash_profile as below:

alias python='/opt/python2.7.3/bin/python'
alias python2.7.3='/opt/python2.7.3/bin/python'

PATH=$PATH:$HOME/bin:/opt/python2.7.3/bin

then run the command source .bash_profile to flush out all the update. but later I found the path was actually wrong and tried to correct it to the right one:

alias python='/opt/python2.7.3/bin/python2.7'    
PATH=$PATH:$HOME/bin:/opt/python2.7.3/bin/python2.7

but when I export the path, it still has the wrong directory included though it does have the right one appended to the end. how I can get rid of the wrong directory from path totally?

share|improve this question

migrated from stackoverflow.com Nov 26 '12 at 22:26

This question came from our site for professional and enthusiast programmers.

1  
try to set the path in /etc/environment file and then log out and log in. –  undefined is not a function Nov 26 '12 at 19:45
1  
I'm a little surprised that you would want /opt/python2.7.3/bin/python2.7 in your $PATH. $PATH should only contain directories. –  Iguananaut Nov 26 '12 at 19:48
add comment

1 Answer

up vote 1 down vote accepted

$PATH should contain directories, not a paths to binary files.

PATH=$PATH:$HOME/bin:/opt/python2.7.3/bin/
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.