Updating Python version that's compiled from source
<p>I run a script on several CentOS machines that compiles Python 2.7.6 from source and installs it. I would now like to update the script so that it updates Python to 2.7.12, and don't really know how to tackle this.</p>

<p>Should I do this exactly the same way, just with source code of higher version, and it will overwrite the old Python version?</p>

<p>Should I first uninstall the old Python version? If so, then how?</p>

<p>Sorry if this is trivial - I tried Googleing and searching through Stack, but did not found anyone with a similar problem.</p>

<p>Replacing 2.7.6 with 2.7.12 would be fine using the procedure you linked.
There should be no real problems with libraries installed with pip easy_install as the version updates are minor. </p>

<p>Worst comes to worst and there is a library conflict it would be because the python library used for compiling may be different and you can always reinstall the library which would recompile against the correct python library if required. This is only problematic if the library being installed is actually compiled against the python library. Pure python packages would not be affected.</p>

<p>If you were doing a major version change this would be okay as well as on CentOS you have to call python with python2.7 and not python, so a new version would call with python2.8</p>

python python-2.7 centos