Jupyter 简明教程

Jupyter QtConsole - Getting Started

在本章中,让我们了解如何开始使用 QtConsole。本章将为您概述此软件并说明其安装步骤。

In this chapter, let us understand how to get started with QtConsole. This chapter will give you an overview about this software and explains its installation steps.

Overview

Qt 控制台是一款类似于 IPython 终端的 GUI 应用程序。然而,它提供了一些在基于文本的 IPython 中无法获取的增强功能。增强功能包括:内联图形、具有语法高亮的多分行编辑、图形化调用提示等。Qt 控制台可以用任何 Jupyter 内核,缺省为 IPython 内核。

The Qt console is a GUI application similar to IPython terminal. However, it provides a number of enhancements which are not available in text based IPython terminal. The enhance features are inline figures, multi-line editing with syntax highlighting, graphical calltips, etc. The Qt console can use any Jupyter kernel, default being IPython kernel.

Installation

Jupyter QtConsole 是 Project Jupyter 的一部分。Anaconda 发行版中已经包含了 QTconsole 应用程序。若要自行安装,请使用 pip 命令,如下所示:

Jupyter QtConsole is a part of Project Jupyter. Anaconda distribution is already having QTconsole application in it. In order to install it individually, use pip command as shown below −

pip3 install qtconsole

您还可以使用 conda 命令来达到此目的:

You can also use the conda command for this purpose −

conda install qtconsole

您可以从 Anaconda 导航器启动 Jupyter 控制台。若要从命令行启动它,您应该使用以下命令,可以在 Windows 命令提示符或 Anaconda 提示符中使用:

You can start Jupyter console from Anaconda navigator. To start it from the command line, you should use the following command, either from the Windows command prompt or Anaconda prompt −

jupyter qtonsole

您将获得一个类似于 IPython 终端的终端,开头是 In[] 提示。现在您可以执行任何 Python 表达式,就像我们在 IPython 终端或 Jupyter 笔记本中执行的一样。

You get a terminal similar to IPython terminal with first In[] prompt. You can now execute any Python expression exactly like we do in IPython terminal or Jupyter notebook

jupyter qtconsole