Jupyter lab kernel crashes repeatedly

I am trying to do sentiment analysis and when I import transformers the kernel crashes. Now, if I run any analysis, the kernel crashes. This is not happening on jupyter lab and jupyter notebook. What should I do?

In that case with which client it is happening? Could you provide specific reproduction instructions, logs from the console, and the version information (jupyter --version)?

Screen Shot 2022-07-01 at 10.43.59 PM

Here you go.

I am afraid this is too little information (please note I also asked about reproduction instructions, and logs). I am not aware of any crashes with these specific versions, but they are not the most recent, so you can try upgrading all the packages to latest versions (possibly easiest by installing in a fresh environment). Without logs it is hard to say, but a likely culprit of kernel crashes is something unrelated to the kernel itself - for example running out of memory. Have you confirmed that the crash does not appear if you import the same thing in plain Python?


I have been using anaconda for about 2 months…so what you said is way above my knowledge. I will uninstall and reinstall anaconda and see if that helps.