'Jupyter Notebook Kernel dies when importing tenserflow

I am using Macbook Air with M1 chip. When trying to import tensorflow in Jupyter notebook, the kernel dies and displays a prompt that "Kernel has died and will restart in sometime". Could someone help me fix this?

Tensorflow version - 2.5.0 Python version - 3.8.8



Solution 1:[1]

Try running the notebook file within VS Code, there are extensions to help with that. Also check this article on how to install tf on M1 https://towardsdatascience.com/installing-tensorflow-on-the-m1-mac-410bb36b776

Solution 2:[2]

It seems this is a recurring issue with multiple people with the m1 macs. Since it is still fairly new, it is possible that Jupiter notebook still doesn't fully support it. Try using anaconda navigator with the windows emulator. Here is a link to a forum post with people having the same problem.

https://github.com/apple/tensorflow_macos/issues/45

Anaconda and upgrading to new M1 Mac

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2