1

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

wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz
tar fxz Python-2.5.2.tgz
cd Python-2.5.2
./configure
make
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.

2

Use the absolute path:

/usr/local/bin/python2.5 /path/to/your/script
| improve this answer | |
0

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 :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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