How can I debug a dieing jupyter notebook ipython kernel?

Viewed 968

When running my jupyter notebooks, the ipython kernel (Python 3.8, Anaconda) keeps dieing and being restarted.

I want to find what causes it to misbehave. Sadly, I can find no debugging information other than the kernel is dead and restarted.

How can I find more verbose information which may help with post mortem analysis? Is there any error log or something like that?

2 Answers

When you start Jupyter from a console with this command (may from the Anaconda terminal):

jupyter notebook --debug

then it will print extended logging messages. You may also pipe those messages into a separate logfile.txt using

jupyter notebook --debug > logfile.txt 2>&1

Can you try uninstalling all of:

ipykernel
ipython
jupyter_client
jupyter_core
traitlets
ipython_genutils

And then install again. If you're doing this inside a conda env, it might be easiest to create a new environment and start from scratch. Also, if you're going to install with conda, run conda clean -tipsy to clean up conda caches before you start

Related