ps1495
ps1495

Reputation: 171

Kernel appears to have died - Jupyter notebook python matplotlib

I am trying to learn charting in Python and keep getting this message in Jupyter:

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

My other basic programs are working, so it looks like using Matplotlib is causing this problem. Any thoughts on how to resolve this?

import matplotlib.pyplot as plt

plt.plot()
plt.show()

Screenshot of message I am getting

Upvotes: 11

Views: 20033

Answers (4)

Andrew Carlson
Andrew Carlson

Reputation: 21

If the libiomp5md.dll file is not in the binary exectuables folder of your environment, then this may be the cause of the kernel dying.

  1. Download the libiomp5md.dll file from a trusted online source. I used https://www.dll-files.com/libiomp5md.dll.html and downloaded the latest version. I do not condone the use of this link, and please do your own research to find a trusted source to download this file.

  2. Navigate to -> ./anaconda3/envs/your_env_name/Library/bin and add the libiomp5md.dll file to that folder.

  3. matplotlib should now work without kernel dying, as it did for me.

Upvotes: 2

yinghaodang
yinghaodang

Reputation: 373

if you don't solve the problem after using method above, you can try this:

import os    
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'

add two lines of codes in your python code. This mothed is also useful to pycharm.

Upvotes: 23

1suming
1suming

Reputation: 11

I did the following :

conda install --yes freetype=2.10.4

it works. Great!

Upvotes: 1

Lluna Sanz Montrull
Lluna Sanz Montrull

Reputation: 43

I try the solution of this video, based on this post, and it worked for me:

  • Run Anaconda Prompt as administrator
  • conda install --yes freetype=2.10.4

Upvotes: 1

Related Questions