首頁 > 軟體

CentOS 6.5安裝IPython3.0

2020-06-16 18:03:02

一、安裝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 ~]# tar xf Python-2.7.8

2、進入解壓後的資料夾Python-2.7.8,編譯:

[root@centos_1 Python-2.7.8]# ./configure --prefix=/usr/local/python2.7

3、make安裝

[root@centos_1 Python-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_1 tmp]# tar zxvf ipython-3.0.0

3、安裝readline-devel包

在編譯安裝Ipython之前,確保已經安裝了readline-devel包,否則安裝完成後,IPython將無法正常輸入;

[root@centos_1 ~]# yum install readline-devel

3、使用Python2.7.8編譯安裝

[root@centos_1 ipython-3.0.0]# /usr/local/python2.7/bin/python setup.py build

[root@centos_1 ipython-3.0.0]# /usr/local/python2.7/bin/python setup.py install

4、安裝完成之後,會在Python2.7.8的bin目錄下面生成一個IPython的可執行檔案,為了方便使用,將IPython連線到/usr/bin目錄下面

[root@centos_1 bin]# ln -sf ipython  /usr/bin/ipython

[root@centos_1 ~]# ipython 
WARNING: IPython History requires SQLite, your history will not be saved
Python 2.7.8 (default, Mar 24 2015, 19:00:34) 
Type "copyright", "credits" or "license" for more information.
IPython 3.0.0 -- An enhanced Interactive Python.
?        -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?  -> Details about 'object', use 'object??' for extra details.

CentOS 6.4 中IPython如何啟動Qt控制台和NoteBook?  http://www.linuxidc.com/Linux/2014-04/100037.htm

CentOS 5安裝IPython  http://www.linuxidc.com/Linux/2014-04/100038.htm

CentOS和RHEL安裝 IPython 0.11  http://www.linuxidc.com/Linux/2014-04/100041.htm

CentOS6.5安裝Python2.7.8以及安裝IPython  http://www.linuxidc.com/Linux/2015-01/111092.htm


IT145.com E-mail:sddin#qq.com