Switching between python versions

If you've installed a different version of python via yum using pyvault repos, then you need to switch the default python back to the systems default to avoid problems with the OS packages.

Install the alternatives first:

# alternatives --install /usr/bin/python python /usr/bin/python2.3 100
# alternatives --install /usr/bin/python python /usr/bin/python2.4 24

where 100 and 24 are the priority numbers (Higher number prevailing).

Remove existing symlinks:

# rm /usr/bin/python

Configure the default:

# alternatives --config python

Or, set it to create automatically, which will use the highest priority:

# alternatives --auto python

Check with:

$ python -V

Comment