The Python upgrade:
***************************************************************************************************************
1. View the Python version
(1). [Root@localhost ~]# Python-v
Python 2.4.3
So centos the default Python is 2.4.3, you need to upgrade python2.4 to version 2.6.
2. Download python2.6.7.tar.bz2
http://www.python.org/ftp/python/2.6.7/Python-2.6.7.tar.bz2
Installation:
(1). $tar JXVF python2.6.7.tar.bz2
(2). $CD Python2.6.7
(3). $./configure
(4). $make && Make Install
Since then, the python2.6 installation path defaults to the/usr/local/lib/python2.6
View Python version:
$ python--version (-V)
3. Establish a soft connection so that the system's default Python points to python2.6
Normally, even if the python2.6 installation is successful, the system's default pointing Python is still 2.4.3, considering that Yum is based on python2.4.3 to work properly and is not easy to uninstall.
How do you point the system's default Python to version 2.6?
(1) Mv/usr/bin/python/usr/bin/python.bak (created by oneself)
(2) Ln-s/usr/local/bin/python2.6/usr/bin/python
Verify that the Python point is successful:
Ll/usr/bin/python
Python-v
Back to the column page: http://www.bianceng.cnhttp://www.bianceng.cn/Programming/extra/
*************************************************************************************************************** *******
The dependency problem of python2.4
*************************************************************************************************************** *******
When installing software or system update software, the system complains: you need to rely on python2.4 because your system has a Python version too high or your Python has been updated to a newer version
Workaround: Reinstall python2.4
Detailed steps are as follows:
# CD/USR
# wget Http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz
# TAR-ZXVF Python-2.4.1.tgz
# CD Python-2.4.1
#./configure-prefix=/usr/local/python-2.4.1
# make
# make Install
# mv/usr/bin/python/usr/bin/python-2.4.1
# ln-s/usr/local/python-2.4.1/bin/python/usr/bin/python
The ok,python2.4 installation is complete.