Jupyter 简明教程
IPython - Introduction
Project Jupyter 是用于交互式计算的一套软件产品。IPython 最初是由 Fernando Perez 于 2001 年开发的,作为 Python 解释器增强版。2011 年推出了基于 Web 的 IPython 终端界面,称为 IPython notebook。2014 年,Project Jupyter 开始作为 IPython 的一个分支项目。
Project Jupyter is a suite of software products used in interactive computing. IPython was originally developed by Fernando Perez in 2001 as an enhanced Python interpreter. A web based interface to IPython terminal in the form of IPython notebook was introduced in 2011. In 2014, Project Jupyter started as a spin-off project from IPython.
Jupyter 项目下的软件包包括 −
Packages under Jupyter project include −
-
Jupyter notebook − A web based interface to programming environments of Python, Julia, R and many others
-
QtConsole − Qt based terminal for Jupyter kernels similar to IPython
-
nbviewer − Facility to share Jupyter notebooks
-
JupyterLab − Modern web based integrated interface for all products.
Python 的标准发行版随 REPL (Read-Evaluate-Print Loop) 环境一起提供,该环境采用 IPython shell 的形式带 >>> 提示符。IPython(即 Interactive Python)是 Python 的增强型交互式环境,它比标准 Python shell 具有更多功能。
Standard distribution of Python comes with a REPL (Read-Evaluate-Print Loop) environment in the form of Python shell with >>> prompt. IPython (stands for Interactive Python) is an enhanced interactive environment for Python with many functionalities compared to the standard Python shell.
Features of IPython
IPython 提供的特性比标准 Python 多。它们如下所述 −
IPython offers more features compared to the standard Python. They are as follows −
-
Offers a powerful interactive Python shell.
-
Acts as a main kernel for Jupyter notebook and other front end tools of Project Jupyter.
-
Possesses object introspection ability. Introspection is the ability to check properties of an object during runtime.
-
Syntax highlighting.
-
Stores the history of interactions.
-
Tab completion of keywords, variables and function names.
-
Magic command system useful for controlling Python environment and performing OS tasks.
-
Ability to be embedded in other Python programs.
-
Provides access to Python debugger.
History and Development
IPython 最初是由 Fernando Perez 于 2001 年开发的。其当前版本是 IPython7.0.1,它需要 Python 3.4 版或更高版。IPython 6.0 是第一个支持 Python 3 的版本。使用 Python 2.7 的用户应使用 IPython 的 2.0 到 5.7 版
IPython was originally developed by Fernando Perez in 2001. Its current version is IPython7.0.1 which requires Python 3.4 version or higher. IPython 6.0 was the first version to support Python 3. Users having Python 2.7 should work with IPython’s version 2.0 to 5.7
计算笔记本的概念始于 80 年代,当时 MATLAB 和 Mathematica 得以发行。面向交互式外壳的这些 GUI 前端具有文本格式化、添加图形、表格以及添加数学符号等功能。Sage Notebook 也是一款基于 Web 的笔记本。
The concept of computational notebooks started in 80s decade when MATLAB and Mathematica were released. These GUI frontends to the interactive shell had features like text formatting, adding graphics, table and adding mathematical symbols. Sage notebook is also a web based notebook.
IPython 的创建者于 2005 年开始为 IPython 外壳的笔记本界面开展工作。IPython Notebook 很快增加了对其他语言(例如 R 和 Julia)的支持。直到 2014 年,Perez 才将 Jupyter 项目作为一个衍生项目从 IPython 中剥离出去,因为 IPython 项目已经变得庞大,其中增加了 Notebook Server 和 Qt 控制台等产品。
Creaters of IPython started working on notebook interface for IPython shell in 2005. IPython notebook soon added support of other languages like R and Julia. It was in 2014, that Perez started Jupyter project as a spin-off project from IPython, since IPython project was becoming big with products like notebook server and Qt console added to it.
自 IPython 4.0 起,所有附加组件都被移至 Project Jupyter 并为 IPython Notebook 增加了对其他语言的支持。IPython 继续专注于改进其增强的解释器功能。它还为 Jupyter Notebook 前端提供主要内核。
Since IPython 4.0, all additional components were shifted to Project Jupyter and adding support of other languages to IPython notebook. IPython continues to focus on improvement of its enhanced interpreter feature. It also provides primary kernel to Jupyter notebook frontend.