Server Fault is a question and answer site for system and network administrators. 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 am working on centOS 5 Server with python's version 2.4.3

Now i installed python 2.5 (got command from SF) from link as

tar fxz Python-2.5.2.tgz
cd Python-2.5.2
make altinstall

then i executed command python -V it says

Python 2.4.3

then i tried command to change it from this to 2.5 as i have syntax error in my file because of the lower version of python.

 python_select python-2.5.2

but it says

-bash: python_select: command not found

can any one please help me how to change it so that i can execute my .py file.

Any help will be highly appreciated.

share|improve this question

Use the absolute path:

/usr/local/bin/python2.5 /path/to/your/script
share|improve this answer
up vote 0 down vote accepted

i wrote

#!/usr/bin/env python2.5
from __future__ import with_statement

on my python file then it took this path for execution because there was previous path set already. Thanks for the help :)

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.