I am facing an error which I do not know how to fix. I'm trying to get this piece of code to work on windows but I have this error appearing
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.plot()
Error: "The kernel appears to have died. It will restart automatically."
I just had the same error message appear while using Jupyter notebook. Based on what I read, I think it's suggested to reinstall pandas, NumPy and matplotlib (other libraries if necessary) and see if that works.
I had several other issues, so I reinstalled the Anaconda navigator.
You can just use py script instead of Jupyter but if you wanna use Jupyter try either reinstalling NumPy or update.
pip install -U numpy
Related
I am trying to import sklearn library by writing code like from sklearn.preprocessing import MinMaxScaler but it kept showing same error.
I tried uninstalling and reinstalling but no change. Command prompt is also giving same error. Recently I installed some python libraries but that never affected my enviroment.
I also tried running the code in jupyter notebook. When I tried to import numpy like import numpy as np, it ran successfully. So the problem is only with sklearn.
Also, I have worked with sklearn before but have never seen such an error.
You have to read into the error message. For me sklearn was importing something from scipy which uses the outdated np.int, so updating scipy solved the issue for me.
When I run import tensorflow an error occurs which say that my kernel have died.
I have tried conda install nomkl but doesnt seems to work.
I have also tried deleting ibiomp5.dylib file and it doesnt work.
So now I am clueless on what I should do.
Would like some help with this
Hi, I'm taking a machine learning course on udemy and im trying to run the following:
%matplotlib inline
import matplotlib.pyplot as plt
The issue is that once I run this, it kills the kernel and the message shown in the picture is the only thing that comes out.
I'm new to this and I just want to move forward with the course but this is holding me back.
TIA
The problem was solved for me by running conda install freetype=2.10.4, as reported on this GitHub issue
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()
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.
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
I did the following :
conda install --yes freetype=2.10.4
it works. Great!
I'm trying to run a basic matplotlib script to ensure that everything is working. The program is as follows:
import numpy as np
import matplotlib.pyplot as plt
x=np.arrange(0,5,0.1);
y=np.sin(x)
plt.plot(x,y)
But when I run "python a.py" in the terminal I am getting the error
that the numpy module has no attribute 'arrange'.
I uninstalled numpy and matplotlib and reinstalled them. First numpy, then matplotlib through the ubuntu repository but I am still getting this error. I can't figure out what is wrong. Am I getting an incomplete installation or something? I am using Ubuntu 14.04.
The method name is arange, not arrange.
Also, after using plt.plot(...), you need to call plt.show() to draw the plot.