Update.
Changing the alias unfortunately does not work. I have changed the alias to alias python='/usr/bin/python2.7' however the shell script still runs the python script in 2.4.3.
Muru - I am using PYTHONPATH to direct to the python path. However as you said this may not be correct. Is there a version of PYTHONPATH that can be used to direct to the a specific python executable?
The Shell script is below as requested.
cd ../../../..
export BREVE_CLASS_PATH=/home/user/breve_2.7.2/lib/classes
export PYTHONPATH=/usr/bin/python2.7
cd /home/user/breve_2.7.2
./bin/breve /home/user/breve_2.7.2/demos/Getting-Started/RandomWalker_version.py
I am running a shell script that runs a python script in a certain program.
My problem is the python script is being launched in python 2.4 whereas I need it to run in python 2.7. In the shell script I have added the following line to try to enforce python2.7 to be used.
export PYTHONPATH=/usr/bin/python2.7
However when the python script prints what version it is using I get python 2.4.3. Am I going the correct way about this?
How should I proceed?
PYTHONPATH
is not the path to the python executable but the path to python modules. What does the shebang of the python script contain?head -1 /home/user/breve_2.7.2/bin/breve /home/user/breve_2.7.2/demos/Getting-Started/RandomWalker_version.py
?