These instructions were mostly taken from here, though I've modified them to install Python 2.7.15 and the latest setuptools
package.
# Install dependencies
yum groupinstall -y 'development tools'
yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wget
# Download the Python source and unpack it
wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz
tar -xvzf Python-2.7.15.tgz