Jupyter Notebook Support
With Jupyter Notebook integration available in PyCharm, you can easily edit, execute, and debug notebook source code and examine execution outputs including stream data, images, and other media.
Notebook support in PyCharm includes:
Editing and preview:
Ability to present a notebook as source code with textual cell definitions and manipulate cells as regular code.
Live preview of the cell execution output and Markdown content.
Auto-saving changes that you make in your files. Saving is triggered by various events, for example, closing a file or a project, or quitting the IDE.
Ability to run cells and preview execution results.
Dedicated Jupyter Notebook Debugger.
Shortcuts for basic operations with Jupyter notebooks.
Ability to recognize .ipynb files and mark them with the icon.
Quick start with the Jupyter notebook in PyCharm
To start working with Jupyter notebooks in PyCharm:
Get familiar with the user interface
In PyCharm, you can work with Jupyter notebook files using three viewing modes:
In this mode, you can add notebook cells and edit them.
In this mode, you can both edit cells and preview their output. This is the default viewing mode for Jupyter notebooks in PyCharm.
In this mode, you can preview markdown and raw cells as well as code cell execution results.
Editing and preview modes reflect the currently selected PyCharm user interface appearance.
The Jupyter notebook toolbar provides quick access to all basic operations with notebooks:
The Jupyter Server widget that shows the currently used Jupyter server. Click the widget and select to setup another local or remote Jupyter server.
List of the available Jupyter kernels.
Executes all cells in the notebook.
Opens the Jupyter Quick List for easy access to the basic notebook operations:
Upload to Datalore/Update uploaded notebook. Enables sharing the selected Jupyter notebook using Datalore, an intelligent web application for data analysis. Click this button to start sharing the current notebook file. Once you modify the notebook file, this button enables updating the shared notebook in Datalore.
Enables auto scrolling from the source cell in the Editor to the corresponding output in the Preview pane.
Enables auto scrolling from the cell output in the Preview pane to the corresponding source cell in the Editor.
Click this icon to show source code fragments in the Preview pane.
Click this icon to switch into the editor only viewing mode.
Click this icon to show both Editor and the Preview pane.
Click this icon to switch into the preview only mode.
The Server Log tab of the Jupyter tool window appears when you have any of the Jupyter server launched. The Server log tab of this window shows the current state of the Jupyter server and the link to the notebook in a browser.
It also provides controls to stop the running server () and launch the stopped server .
The Variables tab provides the detailed report about variable values of the executed cell.
You can use the icon to manage the variables loading policy.
Refer to the following topics for more information about Jupyter Notebook support in PyCharm: