How to solve "The kernel appears to have died. It will restart automatically"

1.4k Views Asked by At

I am not having the error but when I run the below line its continuously showing that kernel appears to dead. It will restart automatically.

I am having the python 3.7.10 and tensorflow 2.4.0 installed.

The error is showing when I run the below line of code.

from imageai.Detection.Custom import DetectionModelTrainer

I tried every solution which is mentioned on google but unable to solve.

Error Screenshot

Thanks is advance.

1

There are 1 best solutions below

0
AudioBubble On

There could be the problem with supported package version mismatch in the anaconda environment. You can try by restarting the kernel after sometime or can rectify this error by creating a new environment and install the TensorFlow and other required packages again on that.

Create a new environment for TensorFlow using the code below:

conda create -n tf tensorflow
conda activate tf

and insatll TensorFlow:

conda install pip
pip install tensorflow

You need to open the JUPYTER notebook in the same environment by selecting the "tf2" and try importing TensorFlow :

import tensorflow as tf
print(tf.__version__)

if there is no error - TensorFlow installed successfully.

Now, you can install any reuired package using !pip install package_name in Jupyter Notebook, as in this case:

!pip install imageai

Also check this link as a reference for using imageai