python 2.7.9 源码安装:
1.python 安装准备 https://www.python.org/downloads/release/python-279/
yum -y groupinstall "Development tools"
yum -y install zlib-devel
yum -y install bzip2-devel
yum -y install openssl-devel
yum -y install ncurses-devel
yum -y install sqlite-devel
2.下载python源码 && 编译安装
tar -zxvf Python-2.7.9.tgz
cd Python-2.7.9/
./configure --prefix=/usr/local/python
make && make install
3.python 路径配置
vim /etc/profile
export PYTHON_HOME=/usr/local/python
export PATH=$PYTHON_HOME/bin:$PATH
source /etc/profile
4.测试是否安装成功
python --version