Import tensorflow kills jupyter notebook kernel

I am new to lambda stack. I opened a jupyter notebook from the terminal with “jupyter notebook” to test a few things. Python version seems good (“import sys”, “sys.version” > ‘3.6.7 (default, Oct 22 2018, 11:32:17) \n[GCC 8.2.0]’), and PyTorch imports properly (“import torch”, “torch.version” > ‘0.4.1’). But, just running “import tensorflow as tf” causes the kernel to die:

Kernel Restarting
The kernel appears to have died. It will restart automatically.

Please help me address this. Thanks.

Hi Sergio, can you explain in more detail what you mean by “Kernel Restarting” and it appearing to die. Looks like a conda / jupyter notebook issue.

This GitHub issue suggests updating conda via:

conda update anaconda

or alternatively using these settings for TF:

config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)

Sounds just like my issue, but could be a different cause…

Same issue, now running local…
Windows10, Jupyter, Anaconda, TF installed, env active

import tensorflow as tf
popup message & subsequent red flag up top: “Dead Kernel”
Isolated via comment-out all other lines
Import tf is singular cause: every time

in my case, found help in terminal output of import statement…
“You can, at your own risk, disable this warning by setting the environment
variable ‘HDF5_DISABLE_VERSION_CHECK’ to a value of ‘1’.”

This was due to “h5py is running against HDF5 1.10.5 when it was built against 1.10.6”
Even tho I had 1.10.6 installed

Also, found sage wisdom in all comments all the way down to the bottom here…