Error importing tensorflow

whenever i’m trying to import Tensorflow my kernel dies .says “unfortunately kernel died.will be restarting automatically” and i cannot import.need help if u have any idea please ping me.its really hindering my researches.

This has to do with your coding environment. It requires some technical skills to fix this. I do not know your proficiency level. However, you can look at trying it out on colab. It does not require technical setup. You just need a Google account and connection to the internet. I know you can figure out how to properly set up the environment as you proceed.

I can see a message being shown when you run numpy import, can you share that message? @dekshanya

In your case kernel is crashing either the command is too large to execute based on the allocated compute resources or you have network server issue.

does importing tf and np separately in different cell cause kernel crash??

Regards
DP

1 Like

@Deepti_Prasad
yeah the numpy import works and other normal codes work but the issue is with tensorflow import alone.
as u hav asked for that message on importing numpy its
“Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.”
(im using mac M1)

but using colab seems to be difficult because evertime i need to load the data set or get the dataset to drive and mount it and come up with it all again from start i dont see the ease of use as in jupyter notebook i can easily access the files .so i kinda need this to be fixed.also it was working fine all the days but now all of a sudden the error popped up.

This does seem issue with kernel crashing because of computer allocated resource as too many libraries being import in a single cell, kernel gets keep crashing

1 Like

In that case, I recommend checking the Python version you’re using, as it might no longer be supported. You can try setting up a new virtual environment and reinstalling all the required packages, including Jupyter. This should help resolve the issue and get you back up to speed. Additionally, verify that you have enough storage space available on your local drive, as insufficient space could also cause such issues.

1 Like

if that is so then when i import just the tensorflow alone it must be working fine but that is not the case.so im stuck

okay i’ll try that then nd update you on that.thanks so much for your efforts!

another issue could also be with tensorflow version with python version being compatible.

hey guys ,i have found a solution that works after too much research with all the methods failing ,
what worked for me to resolve this issue:
1)uninstall tensorflow
2)create a env (no crowd of packages installed)
3)install tensorflow with conda instead of pip command on the directory of the file
: $ conda install tensorflow
it took comparitively more time to install
i hav only 8 gb of ram available
it works fine now!!
@lukmanaj @Deepti_Prasad
thanks for the suggestions friends!

3 Likes

You’re welcome

1 Like

try another platfrom.