I have Python 2.4 and 2.7 on my Centos server.
When I execute python I get version 2.7 srat up.
When I execute python2.4 I get version 2.4 start up.
The above is as I want but when I execute python2.7 I get python2.4 start up.
I want to put this right but can’t work out how.
I was expecting to see a link from 2.7 to 2.4 but all I can find is as follows:
In /usr/bin directory I have:
python
python2 -> python
python2.4
In /usr/local/bin I have:
python
python2.7
python2.7-config
python-config -> python2.7-config
I’ve had a look in python2.7-config but can see nothing that may link the python2.7 bin to python2.4.
Can anyone suggest how I might correct this issue. I don’t want to start uninstalling python versions as I know (from bitter experience) that that can mess up the OS.
Thanks
–edit–
/usr/bin/python --- 2.4
/usr/bin/python2 --- 2.4
/usr/bin/python2.4 --- 2.4
/usr/local/bin/python --- 2.7
/usr/local/bin/python2.7 --- 2.4
Try removing
pythonfrom both /usr/bin/ and /usr/local/bin/ as wellas removing
python2from /usr/bin/.Then try running
which python2.7to see, where doespython2.7comes from.Finally, create a single
pythonand a singlepython2symlinks for desired python versions in /usr/bin/. Note, that CentOS may rely onpython -> python2.4andpython2 -> python2.4links.