Originally Posted by transcend
If a newer version is required, I'd recommend installing a second copy to /usr/local (you should just be able to ./configure prefix=/usr/local && make && make install IIRC)
You shouldn't need to jump through those hoops. As any Python README will note, you have choices:
make install - generally clobbers an existing installation
make altinstall - will not clobber
The executable is what really matters. If centos in its wisdom requires Python 2.4.x for some reason, you don't want to override that. But I would not personally use 2.4 myself, preferring features and speed improvements available in more recent versions.
make altinstall will put Python where it should go for that platform, but it won't over-write the already installed "system" python executable but instead will deposit a python2.x executable.
It should be quite safe installing a newer major version of Python. For example if your OS has Python:
/usr/local/bin/python -- 2.4.3
It's libraries will typically be at:
Thus if you make altinstall
2.5 or 2.6:
/usr/local/bin/python -- 2.4.3 (not affected)
/usr/local/bin/python2.6 -- the new executable
/usr/local/lib/python2.4/ -- 2.4.3 not affected
/usr/local/lib/python2.6/ -- the new libraries.
Living with multiple versions isn't that troublesome but you will have to think about it a bit. When installing your own apps you'll want to take care to use the newer Python, i.e.:
python2.6 setup.py install
That all said, unless you really need a feature in later versions, most machine's stock version will do, particularly for the newcomer or casual punter.