Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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
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.