一.IPython簡介
IPython 是一個交互式的shell,比默認終端好用,支持自動縮進,并且內置了很多有用的功能和函數??梢栽谌魏尾僮飨到y上使用。
二.安裝方法
1.pip 在線安裝
pip install ipython
pip install “ipython[notebook]”
2.下載安裝
可以到GitHub 下載安裝包,切換到目錄下然后運行下面的腳本
Python setup.py install
三.簡單使用
打開Linux終端,在命令行中輸入
root@Linux:/# ipython
便會進入ipython 的交互式shell,并會顯示 ipython 的一些信息,在In [1]: 便可以輸入python的代碼
Python 2.7.6 (default, Jun 22 2015, 17:58:13) Type “copyright”, “credits” or “license” for more information. IPython 4.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. In [1]: (此處輸入代碼)
比如打印”hello ipython”,輸入下列代碼
In [1]: print (‘hello ipython') hello ipython In [2]:
到此Linux環境安裝IPython配置python開發環境就弄好了,如果要在windows下配置開發環境,需要先安裝Anaconda,這是一種安裝管理的程序,使用它可以很方便的完成Python 的升級操作,并且自帶了很多的Python 庫。
以上就是本文的全部內容,希望對大家的學習有所幫助。