How can I upgrade it in Centos 6.5?

I try below

Download Python and extract it

wget http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz
xz -d Python-2.7.8.tar.xz
tar -xvf Python-2.7.8.tar

Installation process

Enter the directory:

cd Python-2.7.8

Run the configure:

./configure --prefix=/usr/local

compile and install it:

make
make altinstall

Checking Python version:

python2.7 -V

Python 2.7.8

export PATH="/usr/local/bin:$PATH"

กรณีที่ลง 2.7 แล้ว yum ไม่ได้ให้ทำดังนี้

vim `which yum`

change #!/usr/bin/python to #!/usr/bin/python2.6