I installed python2.7 as an alternate version of python. I was attempting to utilize a newer version of mod_python and I needed 2.7. The default python (/bin/python) is 2.6. Unfortunately now, calling python from the command line calls /usr/local/bin/python2.7. I realize that I can set up a number of links pointing back to /bin/python--I just don't think this is a great idea. The OS (CentOS6) uses 2.6.2 by default, and I don't want the OS to use another version of python. I installed 2.7 from source, but forgot to specify 'make altinstall' rather than 'make install'. This is a semi-work related server, so I need to implement something that will permanently fix the problem. I realize .profile and .bashrc have paths for python, but these appear to be more for bash logins via ssh. I need to find a way to change the system's default python path back to 2.6.2. How would one go about doing this? Thank you for your help.
This is because /usr/local/bin comes before /bin in your $PATH.
What does which python say? I suspect it gives a symlink /usr/local/bin/python to /usr/local/bin/python2.7. Changing that symlink to /bin/python or removing it altogether should fix your problem.
Installed a python2.7 as an alternate, but path to default 2.6 is destroyed. System path file for default interpreter?