1. CentOS 6.X的安装就不多说
2.安装包Python2.7.6 和Ipython的下载官网都有,自行下载。
注意,不要去卸载系统自带的python程序,在CentOS6.X中python为2.6.X的版本
3.解压源码包
tar xf Python-2.7.6.tar.xz -C /usr/local/ #解压python
tar xf ipython-1.2.1.tar.gz -C /usr/local/ #解压ipython
yum install -y readline-devel #在编译安装python之前要事先安装readline-devel这个软件包
4.编译安装python
./configure --prefix=/usr/local/python27 #若想了解更多参数在编译之前./configure --help
make&& make install
5.编译安装ipython
/usr/local/python27/bin/python2.7 setup.py build #安全起见先检查一遍,
/usr/local/python27/bin/python2.7 setup.py install #安装ipython
6.创建两个连接,让日后调用起来更加方便
ln -sv /usr/local/python27/bin/python2.7 /usr/bin/python27
ln -sv /usr/local/python27/bin/ipython /usr/bin/
转载于:https://blog.51cto.com/ivanfcl/1888941