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'


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'    

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.

try to set the path in /etc/environment file and then log out and log in. –  Ashwini Chaudhary Nov 26 '12 at 19:45
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

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer


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