It is very simple and with a single line of shell script
For example if I have python2.6 is the default and I wanna to change it to python2.5
Here is the default python when you just type python in the command
~$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
Now let's change it
Now check the verstion
~$ sudo rm /usr/bin/python && sudo ln -s python2.5 /usr/bin/python
and also to change it back use the same command again
~$ python
Python 2.5.4 (r254:67916, Jan 20 2010, 21:45:54)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
How this works??
~$ sudo rm /usr/bin/python && sudo ln -s python2.6 /usr/bin/python
1) we remove the executable from /usr/bin/python
2)we link (ln) the python version we want to be copied again to the location of python executable
Very simple :)
Hope it is useful :)
thanks a lot we faced this kind of problems when installing some application on Ubutu
ReplyDeleteAny time Mr. Raed :)
ReplyDeleteI hope my blog posts always be helpful for you :)
I have followed this technique to downgrade from version 2.6 to 2.5, it worked but some applications stopped working any idea how to fix this??
ReplyDelete