[root@linuxso.com]# pythonPython 2.6.6 (r266:84292, Nov 22 2013, 12:16:22)[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>>
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
[root@localhost liukk]# wget http://mirrors.sohu.com/python/3.3.3/Python-3.3.3.tar.bz2--2013-12-24 06:10:56-- http://mirrors.sohu.com/python/3.3.3/Python-3.3.3.tar.bz2Resolving mirrors.sohu.com... 119.188.36.70Connecting to mirrors.sohu.com|119.188.36.70|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 14122529 (13M) [application/octet-stream]Saving to: “Python-3.3.3.tar.bz2”58% [======================================================================================> ] 8,216,640 128K/s eta 43s
tar jxvf Python-3.3.3.tar.bz2 -C /usr/local/src/cd /usr/local/src/Python-3.3.3/./configure --prefix=/usr/local/python3.3make && make install
mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/python3.3/bin/python3.3 /usr/bin/python
[root@localhost bin]# pythonPython 3.3.3 (default, Dec 24 2013, 06:29:34)[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linuxType "help", "copyright", "credits" or "license" for more information.
>>>