PyCharm 2017.1 Help

IPython/Jupyter Notebook Support

In this section:


Prior to working, make sure that the following prerequisite is met:

Jupyter Notebook is properly installed on your computer. To learn how to install Jupyter Notebook, refer to the official documentation.

Notebook support

PyCharm supports Jupyter Notebook, recognizes *.ipynb files, and allows you to edit them.

Jupyter Notebook files are marked with /help/img/idea/2017.1/ipnb_icon.png icon.

A Notebook file <file name>.ipynb shows document cells including code, text, equations etc.

Notebook support includes:

Configuring an interpreter for a notebook

To configure a remote connection to a notebook, follow these steps:

  1. Open the Jupyter Notebook page of the Settings/Preferences dialog.
  2. In the URL field, specify the https URL with https address of the user's remote notebook. Refer to the pages Notebook server and Jupyter Hub.
  3. Choose the Remote radio-button:
  4. Fill in the username (for JupyterHub) and password.
  5. Click the link Configure remote interpreter. You'll find yourself at the Project Interpreter page.
  6. Configure the remote interpreter, as described in the section Configuring Remote Interpreters via Deployment Configuration.

Creating and opening ipynb files

To create an *.ipynb file:

  1. Do one of the following:
    • Right-click the target directory in the Project tool window, and choose New on the context menu.
    • Press Alt+Insert
  2. Choose the option Jupyter Notebook.
  3. In the dialog box that opens, type the file name.

To open the existing .ipynb files, follow the same steps as for the files of the other types.

File *.ipynb in the editor

The *.ipynb files feature a toolbar with the following buttons:

/help/img/idea/2017.1/io.pngSave and checkpointClick this button to forcibly save all changes to the notebook in its current state (even if the calculations not finished yet).
/help/img/idea/2017.1/new.pngInsert cell belowClick this button to add an empty cell under the current one.
/help/img/idea/2017.1/mainToolbarCut.gifCut cellClick this button to delete the current cell and place it to the clipboard.
/help/img/idea/2017.1/copy.gifCopy cellClick this button to create copy of the current cell in the clipboard.
/help/img/idea/2017.1/paste.pngPaste cell belowClick this button to the paste contents of the clipboard below the current cell.
/help/img/idea/2017.1/run.pngRun cellClick this button to execute the current cell.
/help/img/idea/2017.1/stop.gifInterrupt kernelClick this button to stop the current kernel.
/help/img/idea/2017.1/refresh.pngRestart kernelClick this button to restart the current kernel.
Styles drop-down listSelect the desired presentation style from the drop-down list.

See Also

Last modified: 25 March 2017