Prerequisites

Test running a Jupyter Notebook File Locally

Just to get a feel how IntelliJ acts with Jupyter, let’s run a Jupyter notebook file locally on the demo server that is integrated with IntelliJ

  1. In an existing or new IntelliJ project, create a new Jupyter Notebook File

Untitled

  1. Name the Jupyter Notebook File test
  2. Open the new test.ipynb file from the project viewer if it isn’t open already. The initial file will have 1 cell that is empty

Untitled

  1. Enter the following Python code in the empty cell: car = "subaru" print(f"Is car == '{car}'? I predict True.")
  2. At the top of the file there will be a toolbar that does various operations on the file and the Jupyter server itself. Press the double triangle|Run All button **

Untitled

  1. At this point a demo Jupyter Notebook server is being started and will run the code supplied . After a few moments for the server to start, the result will be displayed

NOTE: If an error is shown “No module named jupyter”, either pip install jupyter into the python that IntelliJ is using or select a Module SDK that contains jupyter. Retry the starting the jupyter server with the double triangle again

Untitled

Untitled

Several items to note. The output is below the cell. At the top right it says Managed http://localhost:8888. Important! Even though this looks like a drop down to select different servers it is not. Think of it as just a label because anything you change here will not make a difference. If you have a local Jupyter Notebook File it will run locally.