How to upgrade to Python 2.7.6 on CentOS


1.首先,先安裝一些工具:

yum -y groupinstall 'Development Tools'
yum -y install openssl-devel* ncurses-devel* zlib*.x86_64
yum -y install bzip2 bzip2-devel bzip2-libs


2.接下來下載python2.7.6
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tgz
3.解壓縮
tar xfz Python-2.7.6.tgz

4.進入python 2.7.6目錄
cd Python-2.7.6

5. read README file or you can follow the lines below
./configure
6.編譯安裝檔
make
7.進行安裝
make install

8.離開console,重新登入

9.重新登入,並輸入下列指令
which python

10.驗證是否安裝成功
python -V