查看当前系统中的python版本
[root@lujie ~]# python --version
Python 2.6.6
安装所有的开发工具包
[root@lujie ~]# yum groupinstall "Development tools"
[root@lujie ~]#yum install zlib-devel bzip2-devel openssl-devel ncurses-devel
下载、编译和安装Python
在官网下载python 3.3版本源码:
wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tar.bz2
tar -jxv -f Python-3.3.0.tar.bz2
cd Python-3.3.0
./configure
make install
[root@lujie Python-3.3.0]# python3.3 --version
Python 3.3.0
至此安装完成