CentOS6.6自带的Python为2.6,此为安装2版本最新的Python2.7.9
一、下载python2.7.9和ipython3.1.0
wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz wget https://pypi.python.org/packages/source/i/ipython/ipython-3.1.0.tar.gz
二、安装readline-devel,使python安装完成后支持退格
yum -y install readline-devel
三、安装gcc,否则配置时会报错,导致无法安装
yum -y install gcc
四、安装python2.7.9
tar zxvf Python-2.7.9.tar.xz cd Python-2.7.9 ./configure --prefix=/usr/local/python make && make install ln -sv /usr/local/python/bin/python2.7 /usr/bin/python279
五、安装ipython3.1.0
tar zxvf ipython-3.1.0.tar.gz cd ipython-3.1.0 python279 setup.py build python279 setup.py install ln -sv /usr/local/python/bin/ipython /usr/bin/
六、Python2.7.9及IPython可以正常使用