You might see an error message like “The kernel failed to start due to the missing module ‘x’…” as shown in the following screenshot. If you’ve seen this error message, it means that the Jupyter Notebook server can’t start because it’s missing some Python modules that you haven’t installed. Maybe you had that installed, but a system upgrade uninstalled it. Maybe you’ve removed the dependency module by mistake or the module was removed due to some other unknown reasons. To fix this error, all you have to do is find the missing module and install it on your computer.
In this article, we will show you how to fix the Jupyter Notebook “kernel failed to start due to missing module” error.
Topic of Contents:
- Finding the Jupyter Notebook’s Missing Kernel Module
- Installing the Jupyter Notebook’s Missing Kernel Module
- Conclusion
Finding the Jupyter Notebook’s Missing Kernel Module
You don’t have to go very far to find the Python module that you need to install to fix the Jupyter Notebook’s “kernel failed to start due to the missing module” error. The missing module name is printed in the error message as well.
As you can see, the missing Python module name in our case is “packaging”. So, all we have to do is install the Python “packaging” module with pip or conda (if you’re using Anaconda Python) command.
Installing the Jupyter Notebook’s Missing Kernel Module
You can install the missing Jupyter Notebook’s dependency module (“packaging” in our case) with the following command if you’re using the official Python programming language:
or
You can install the missing Jupyter Notebook’s dependency module (“packaging” in our case) with the following command if you’re using the Anaconda Python distribution:
We are using the official Python programming language, so we issued the first command to reinstall the missing Python “packaging” module (in our case).
The required missing Python module for Jupyter Notebook to work should be installed.
As you can see, Jupyter Notebook is able to run the codes again. So, the issue is resolved.
Conclusion
In this article, we showed you how to fix the Jupyter Notebook “kernel failed to start due to missing module” error on the official Python (using pip or pip3 command) and Anaconda Python distribution (using the conda command).