一.IPython簡介
IPython 是一個互動shell,比預設終端好用,支援自動縮排,並且內建了很多有用的功能和函數。可以在任何作業系統上使用。
二.安裝方法
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 庫。
以上就是本文的全部內容,希望對大家的學習有所協助。