VS Code Jupyter notebook stuck on “Detecting kernels”; kernel list never loads

2 weeks ago 21
ARTICLE AD BOX

I am using Visual Studio Code with the Jupyter extension to work with Python notebooks.

Problem description

When I open a .ipynb file in VS Code, the notebook never finishes loading kernels.
It stays on “Detecting kernels”(as shown in the right side top of image) indefinitely.

If I close the notebook tab and reopen it (without closing VS Code), the file either:

keeps loading forever, or

opens without any kernel attached

Restarting the notebook does not help.

Actual behavior

Notebook status shows “Detecting kernels” indefinitely

Ctrl + Shift + P → Select Kernel shows no available kernels

Kernel list never populates

Closing and reopening the .ipynb file does not resolve the issue

Expected behavior

VS Code should detect available Python kernels and allow selecting one.


Environment

OS: Windows 10 / 11

VS Code version: 1.107.1

Python version: 3.11.9

Extensions installed:

Python (ms-python.python)

Jupyter (ms-toolsai.jupyter)

Read Entire Article