一开始有这个需求,是因为用 YaH3C 替代 iNode 进行校园网认证时,一直编译错误,提示找不到 Python 的某个模块,百度了一下,此模块是在 Python2.7 以上才有的,但是系统的自带的Python是2.6版本,难怪一直连不上网。于是,继续百度google,进行安装,后来又出现问题...在此开篇记录一下,权当备忘。
查看python的版本
#python -V
Python 2.6.6
1.下载Python-2.7.3
#wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
2.解压
#tar -jxvf Python-2.7.3.tar.bz2
3.更改工作目录
#cd Python-2.7.3
4.安装
#./configure
#make all
#make install
#make clean
#make distclean
5.查看版本信息
#/usr/local/bin/pyth