Skip to content

Kernel crashes

Don Jayamanne edited this page Apr 7, 2022 · 16 revisions

Jupyter Kernels can crash for a number of reasons (incorrectly installed or incompatible packages, unsupported OS or version of Python, etc) and at different points of execution phases in a notebook. The two distinct phases are Starting a Kernel for the first time and Running a cell after a kernel has been started. This page categorizes failures in to the above two categories to aid users in identifying causes for kernel crashes with the intention of being able to address those issues.

Majority of these failures can be attributed to one or more of the following conditions:

  • Missing dependencies
  • Misconfigured or corrupted Python environment
  • Incorrectly installed Python packages
  • Incompatible Python packages
  • Some times, but rarely caused by bugs in Python packages used by Jupyter
  • Unsupported version of Python or OS (its possible the version of Python is still new and the packages haven't been udpated to support these new versions)

Some cells run successfully, however Kernel crashes after running another Cell

It has been observed that the most common cause (if not the only cause) of failures for random kernel crashes after it has started is due to incorrectly installed packages. For instance we've found that kernels can crash if tensorflow has been incorrectly installed.

Cannot run a single cell (Kernel fails to start)

Notes:

  • All error information can be found in the Jupyter output panel accessed via the the command Jupyter: View Outupt.
  • When installing packages always consider using %pip install instead of !pip install in the cells.
  • When installing packages into conda environments consider using %conda install instead of !conda install in the cells.
  • Always activate the terminal with the environment associated with the Kernel.

Known issues
Please up-vote these issues to help us prioritize getting these addressed.

  • A full list of all known issues can be found here.
  • The OCAML kernel does not work (#8897)
  • Kernels using 32-bit Python environments installed via conda does not work (#9134)
  • xeus Python kernel is currently not supported (hence hidden) (#5469)
Clone this wiki locally