VS Code, Jupyter notebooks "Timed out waiting to get heartbeat from kernel process"

Viewed 1383

I've imported a project into VS Code which has Jupyter notebooks as part of it, but I've not managed to get the notebooks to run within VS Code. The error I'm getting is

Timed out waiting to get heartbeat from kernel process

Which pops up as a notification in the bottom right corner of VS Code.

Is there any guidance on how to troubleshoot this?

If I run this in the embedded terminal it runs fine:

jupyter lab

But running the jupyter code blocks within VS Code causes it to hang (i.e. [*] next to code block), and then eventually return the error: Timed out waiting to get heartbeat from kernel process

Incredibly annoying, and I can't find any explanation in the docs of how to work out whats going wrong.

Any help would be greatly appreciated.

3 Answers

I have the same issue. I tried to reinstall both Python and Visual Studio Code, but it was useless. I think its related to one of the latest Visual Studio Code updates since I worked with Jupiter Books last week without problems

And here's an interesting experiment. Create a simple F# workbook using JupyterLab. Save it. Then open it in VS Code. Run it. It will whine at you about timing out, but it will do the computation of the first cell in F# the first time. After that it will fail.

I just ran into the same problem - but only when I started to use VS code on WSL.

When I opened the extensions and had a look into the Jupyter add on, it displayed a message that it requires to be reloaded. After I clicked the button to reload, everything worked as expected again.

Related