安装开发包
# 安装必要的开发包
yum groupinstall "Development Tools"
# 安装必要的支持包
yum install zlib-devel openssl-devel readline-devel bzip2-devel sqlite-devel
下载并安装 python2.7
cd Python-2.7.15
./configure
make
make install
下载并安装pip
其他问题
python2.7
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u’[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:726)’),)’: /simple/pip/
永久解决方案
添加 /etc/pip.conf
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
python2.7 get-pip.py
临时解决方案
python2.7 get-pip.py -i https://pypi.douban.com/simple