question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kernel crashes when importing tensorflow

See original GitHub issue

Environment data

  • VS Code version: 1.60.1
  • Jupyter Extension version (available under the Extensions sidebar): v2021.8.2041215044
  • Python Extension version (available under the Extensions sidebar): v2021.9.1246542782
  • OS (Windows | Mac | Linux distro) and version: debian 11
  • Python and/or Anaconda version: 3.9.2
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): none
  • Jupyter server running: Local (I think, running notebook on a vm with ssh extension)

Expected behaviour

import tensorflow would work

Actual behaviour

See screenshot below

Steps to reproduce:

image

Initially I got same error messages as here https://github.com/microsoft/vscode-jupyter/issues/7190, but unfortunately can’t reproduce them anymore.

Error: Kernel is dead
Error: Kernel is dead
at g._sendKernelShellControl (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:1006195)
at g.sendShellMessage (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:1005964)
at g.requestExecute (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:1008506)
at d.requestExecute (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:37:325680)
at w.requestExecute (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:32:18027)
at w.executeCodeCell (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:301076)
at w.execute (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:300703)
at w.start (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:296367)
at async t.CellExecutionQueue.executeQueuedCells (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:311160)
at async t.CellExecutionQueue.start (/home/debian/.vscode-server/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:310700)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Napuucommented, Sep 21, 2021

Eh, apparently this has nothing to do with jupyter. Following message is returned when trying to import tensorflow on the same machine outside jupyter:

The TensorFlow library was compiled to use SSE4.1 instructions, but these aren't available on your machine.

Error message could be better at jupyter side, but feel free to close this issue if you think otherwise.

0reactions
DonJayamannecommented, Oct 12, 2021

@Napuu thanks for the information, i’ve tried to repro this and unfortunately i cannot. CLosing as you’ve managed to get this working.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Kernel Died error post installing tensorflow - Apple Developer
I am facing the same issue today. After uninstalling anaconda python and reinstalling it, I realize that the issue occurs simply because I...
Read more >
Python kernel dies when importing tensorflow 1.7
The kernel appears to have died. It will restart automatically. This issue only began after updating to tensorflow 1.7. I had not used ......
Read more >
importing tensorflow kills kernel - You.com | The AI Search ...
import tensorflow as tf in a Jupyter notebook immediately triggers a pop-up: The kernel appears to have died. It will restart automatically.
Read more >
Kernels dying when using tensorflow in Jupyter Notebooks.
Kernel dies when creating models using keras.sequential. Using tensorflow version 2.7 and python version 3.8.
Read more >
The kernel appears to have died | Data Science and ... - Kaggle
The problem arises in the loop over training epochs. TensorFlow is set up to load the OpenMP library multiple times, which will cause...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found