yum groupinstall Development tool -y
setuptools 地址:https://pypi.python.org/pypi/setuptools
安装python前需要先安装setuptools
yum install -y zlib-devel
yum install -y bzip2-devel
yum install -y libffi-devel
yum install -y openssl-devel
wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
tar -xf setuptools-19.6.tar.gz
cd setuptools-19.6
python setup.py build
python setup.py install
安装python,最新版本的python2 已经自动修复yum
wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
tar zxf Python-2.7.13.tgz
cd Python-2.7.13
./configure
make && make install
source /etc/profile
python --version
cd setuptools-19.6
python setup.py build
python setup.py install
安装pip
地址:https://pypi.python.org/pypi/pip
wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate
python setup.py build
python setup.py install