PyCharm 2017.2 Help

Running IPython/Jupyter Notebook Cells

Launching Jupyter Notebook

To run a Jupyter Notebook, follow these steps:

  1. Open the desired *.ipynb file for editing.
  2. On the toolbar, click /help/img/idea/2017.2/run.png. PyCharm shows Start Jupyter Notebook dialog box.
  3. Next step depends on the location of the notebook whose cell is to be run.
    • If the notebook whose cell you want to execute is already started outside PyCharm, and you wish to connect to it, then specify the Notebook server URL (copy it from the command line where this notebook was launched, and next paste to the Start Jupyter Notebook dialog box):
      /help/img/idea/2017.2/py_ipynb_start.png
    • If the notebook whose cell you want to execute isn't yet started, then in the Start Jupyter Notebook the users should click Cancel, and then click the Run Jupyter Notebook link that appears on top of the editor:
      /help/img/idea/2017.2/py_ipynb_cancel.png

      After that, run/debug configuration for this notebook is automatically created.

    PyCharm shows the notebook kernel in the Jupyter Notebook tab of the Run tool window:

    /help/img/idea/2017.2/py_ipynb_console.png

    When running another notebook, the corresponding kernel starts:

    /help/img/idea/2017.2/py_ipynb_console_kernels.png

To run ALL CELLS in a Jupyter Notebook, on the main menu choose Run | Run all cells:

/help/img/idea/2017.2/py_ipynb_run_all_cells.png

Progress indication

Note that each cell has its number to the left:

/help/img/idea/2017.2/py_ipynb_cell_number.png

When a cell is being executed, the number changes to an asterisk:

/help/img/idea/2017.2/py_ipynb_asterisk.png

When ready, the cell number insreases:

/help/img/idea/2017.2/py_ipynb_cell_number_plus_one.png
Last modified: 26 October 2017

See Also