介紹
IPython 是一個 python 的交互式 shell,比默認的python shell 好用得多,支持變
量自動補全,自動縮進,支持 bash shell 命令,內置了許多很有用的功能和函數。
IPython 是基於BSD 開源的。
IPython 爲交互式計算提供了一個豐富的架構,包含:
1、強大的交互式 shell
2、Jupyter 內核
3、交互式的數據可視化工具
4、靈活、可嵌入的解釋器
5、易於使用,高性能的並行計算工具
安裝IPython
一、pip安裝IPython
1、首先檢查linux有沒有安裝python-pip包。
[root@lizhi01]# yum -y install python-pip
如果出現有 "No package python-pip available" , "Error:Nothing to do",
說明linux沒有安裝python-pip包。
2、沒有python-pip包就執行命令
[root@lizhi01]# yum -y install epel-release #(安裝Linux的epel的yum源)。
3、再次對 python-pip 進行安裝。
[root@lizhi01]# yum -y install python-pip
4、對安裝好的pip進行升級
[root@lizhi01]# pip install --upgrade pip
5、對IPython進行安裝
[root@lizhi01]#pip install ipython。
二、壓縮包安裝IPython
1、下載ipython安裝包
1)先切換到此路徑下:
cd /usr/local/scr
2)使用wget命令進行下載:
wget https://pypi.python.org/packages/79/63/b671fc2bf0051739e87a7478a207bbeb45
cfae3c328d38ccdd063d9e0074/ipython-6.1.0.tar.gz#md5=1e15e1ce3f3f722da6935d7ac0e51346
2、安裝ipython
1)解壓下載好的安裝包。
[root@lizhi01]# tar xf ipython-6.1.0.tar.gz
2)切換到此路徑下。
[root@lizhi01 src]# cd ipython-6.1.0
3)安裝IPytion。
[root@localhost ipython-6.1.0]# python3 setup.py install
三、在安裝過程中遇到的BUG,可以使用以下方法解決。
Setup script exited with error: command 'gcc' failed with exit status 1
出現bug原因:由於沒有正確安裝Python開發環境導致。
系統環境是Centos
yum install python-devel
yum install libevent-devel
easy_install gevent
或者
pip install gevent
把環境更新下
yum install groupinstall 'development tools'