How to Interrupt the Kernel If the Jupyter Notebook is not responding
If the Interrupt Kernel Does not work then use the following alternative approach
1. Restart the kernel
We can restart the entire jupyter notebook kernel using the Restart Kernel option from the Kernel menu
- Go to Kernel menu
- Click on Restart to restart the kernel
- This will terminate the current kernel and restart again.
2. Stop the Jupyter Notebook Server
Kill the server of the notebook from the terminal and open the notebook again
To kill the server from the terminal follow the steps below
Method 1
Just stop the port of the notebook server by the following the steps
To know on which port the server is running click on the url on the current jupyter notebook is running:
For example the url will be :
http://localhost:8888/tree/PawanKrGunjan
The number displayed after the ‘http://localhost:’ is the PORT number.
From the above we can see the port i.e 8888 here enter the following command to stop the server
jupyter notebook stop <PORT>
To enter the following command we will the follow the following steps:
- Open the new terminal and lanch the active the python on which the current jupyter notebook is running.
- Enter the below command “Jupyter notebook stop 8888“
Here I have put the port 8888 to stop the notebook server
Method 2
Open the same terminal window and Just press Ctrl+C to stop the server in the terminal window where it is running
For windows, it will directly stops
In Linux, it will ask for reconfirmation like for 5 seconds:
Shutdown this notebook server (y/[n])?
To stop the notebook server, press Y with in the 5 seconds:
Stop the Jupyter Kernel if Kernel is not responding
Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Google Colab and Kaggle Notebook are inspired by it. Data transformation and cleaning, statistical modelling, data visualization, machine learning, and many other applications are just a few examples. In the article, we will understand how to install Jupyter Notebook, why it is important to stop a cell, How to interrupt a kernel to stop a cell, Understand kernel interruption, etc.
Contact Us