2

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

Deepak
  • 31
  • 1
  • 2
  • Import tensorflow inside a python shell (not inside jupyter), and then python should also crash but it will provide a much better error message, I think the most likely message is Illegal Instruction. – Dr. Snoopy Jul 24 '21 at 20:34

2 Answers2

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

CoralReef
  • 59
  • 2
0

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

  • Thanks for the answer. I am fairly new to MacOS. If you have any tutorial to do that, would really appreciate it. – Deepak Jul 24 '21 at 15:52
  • Here is how to solve the problem https://stackoverflow.com/questions/65534042/anaconda-and-upgrading-to-new-m1-mac –  Jul 24 '21 at 16:42