1、下载python
1
|
wget https: //www .python.org /ftp/python/2 .7.9 /Python-2 .7.9.tgz |
2、解压、编译安装
1
2
3
4
5
|
tar -zxvf Python-2.7.9.tgz cd Python-2.7.9 ./configure --prefix=/usr/local/python-2.7.9 make make install |
3、系统自带了python版本,我们需要为新安装的版本添加一个软链
1
|
ln -s /usr/local/python-2.7.9/bin/python /usr/bin/python2.7.9 |