Last updated: Apr 10, 2024
Reading time·3 min
The issue where Jupyter Notebook doesn't run your code and is stuck on "In [*]" means that Jupyter is still running your code within the kernel.
To resolve the issue, make sure:
You don't have an infinite loop in your code or a function that recursively invokes itself.
You aren't trying to connect to a database that is currently offline.
Make sure that the problem is not within your code.
The issue most often occurs:
If the issue is within your code, you have to resolve it as interrupting the kernel and rerunning your code wouldn't help.
The first thing you should try is to click on the square "Interrupt the kernel button".
Here is a short clip that demonstrates how this works.
If the issue persists:
Here is a short clip that shows how this works.
Another thing you can try is to:
You can also try to:
If that didn't help either, stop your jupyter-notebook
server and restart it.
Ctrl
+ C
(or Cmd
+ C
on macOS),
type y
and hit Enter
.jupyter-notebook
to start your server again.If the issue persists, try to upgrade the ipykernel
package.
Run the following command from your terminal.
pip install --upgrade ipykernel # Or with pip3 pip3 install --upgrade ipykernel
You can try to restart the Kernel if the issue persists.
If you use Anaconda, try issuing the following command.
conda update ipykernel # Or conda install ipykernel
You can also try to update the Anaconda meta package if you use Anaconda.
conda update conda conda update anaconda
If the issue persists:
You can learn more about the related topics by checking out the following tutorials:
pd.read_json()