Useful tip for jupyter notebooks

(ben.bowles) #1

I have discovered a good way to navigate’s Jeremy’s notebooks.

Use jupyter console --existing after you have started a jupyter notebook. The variables in this console will be linked automatically to the variables in the notebook.

In practice is allows you to run code in the notebook, then inspect the variables to better understand what is happening

(Derek) #2

Really cool finding! Thanks, it makes things lot faster :smiley:


A related tip about connecting to a particular kernel using jupyter console if more than one kernel is running.

In a running notebook, evaluate %connect_info and in the output, look for text like:

  jupyter <app> --existing kernel-e9a297e8-c3df-1122-9908-2132ee01eeba.json

Note / record the string that starts with ‘kernel-’.

Now at a shell where the notebook server is running do:

  jupyter console --existing kernel-e9a297e8-c3df-1122-9908-2132ee01eeba.json

Would be nice to know a simpler way :slight_smile: