Centos6.6安裝IPython3.0
一、安裝Python2.7.8
由於Ipython僅支援Python2.7.8以上的版本,所以需先安裝Python2.7.8
到以下地址https://www.python.org/downloads/release/python-278/ 下載源碼包Python-2.7.8.tgz
1、 解壓:
[root@centos_1~]#tarxfPython-2.7.8
2、進入解壓後的檔案夾Python-2.7.8,編譯:
[root@centos_1Python-2.7.8]#./configure--prefix=/usr/local/python2.7
3、make安裝
[root@centos_1Python-2.7.8]#make&&make
二、安裝Ipython
1、下載Ipython
從URL:https://github.com/ipython/ipython/releases下載Ipython的源碼包ipython-3.0.0.tar.gz,目前最新版本為3.0.
2、解壓安裝包
[root@centos_1tmp]#tarzxvfipython-3.0.0
3、安裝readline-devel包
在編譯安裝Ipython之前,確保已經安裝了readline-devel包,否則安裝完成後,IPython將無法正常輸入;
[root@centos_1~]#yuminstallreadline-devel
3、使用Python2.7.8編譯安裝
[root@centos_1ipython-3.0.0]#/usr/local/python2.7/bin/pythonsetup.pybuild[root@centos_1ipython-3.0.0]#/usr/local/python2.7/bin/pythonsetup.pyinstall
4、安裝完成之後,會在Python2.7.8的bin目錄下面產生一個IPython的可執行檔,為了方便使用,將IPython串連到/usr/bin目錄下面
[root@centos_1bin]#ln-sfipython/usr/bin/ipython
5、連結完成後,就可以直接輸入IPython使用
[root@centos_1~]#ipythonWARNING:IPythonHistoryrequiresSQLite,yourhistorywillnotbesavedPython2.7.8(default,Mar242015,19:00:34)Type"copyright","credits"or"license"formoreinformation.IPython3.0.0--AnenhancedInteractivePython.?->IntroductionandoverviewofIPython'sfeatures.%quickref->Quickreference.help->Python'sownhelpsystem.object?->Detailsabout'object',use'object??'forextradetails.