Centos 6.5 has been released, but Python is a 2.6.6 version, and you can upgrade Python yourself for friends who want to use a new version of Python. 1. View the current version of Python.
[root@localhost liukk]# python
python 2.6.6 (r266:84292, Nov 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7 -4)] on linux2
Type ' help ', ' copyright ', ' credits ' or ' license ' for the more information.
2. Install and upgrade the appropriate package.
Yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
3. Download the Python 3.3 source pack.
[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.bz2
Resolving mirrors.sohu.com ... 119.188.36.70
connecting to mirrors.sohu.com|119.188.36.70|:80 ... connected
. HTTP request sent, awaiting response ... OK
length:14122529 (13M) [Application/octet-stream]
saving to: "python-3.3.3.tar.bz2"
58% [========= =============================================================================> ] 8,216,640 128K/s ETA 43s
4. Install python3.3
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.3 make
&& make install
After installation, you can see the python3.3 in the/usr/local/src/python3.3/bin directory.
5. Configure Python
Mv/usr/bin/python/usr/bin/python.bak
ln-s/usr/local/python3.3/bin/python3.3/usr/bin/python
6. View the version of Python
[root@localhost bin]# python
python 3.3.3 (default, Dec 2013, 06:29:34)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] On Linux
Type ' help ', ' copyright ', ' credits ' or ' license ' for the more information.
At this point, CentOS python3.3 version installed, you can roam the python coding.