IPython Notebook - ShimWarning: package `IPython.kernel` is deprecated

When importing some packages into IPython-Notebook, the following message appears:

%matplotlib notebook import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from scipy.integrate import odeint //anaconda/lib/python3.4/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead. "You should import from ipykernel or jupyter_client instead.", ShimWarning) 

enter image description here

This does not affect the results, but I would like to resolve this error. I realized from some posts that this problem will cause IPython-Notebook to stop working when upgrading to Python 4. I am running IPython Notebook version 4.0.4 via Anaconda on Mac OSX 10.11.1.

I have to admit that I'm not very good at installing the python package, but I need to use this for school and thought it would be a good way to learn this stuff.

+5
source share
3 answers

I had a similar warning caused by the line:

 %matplotlib notebook 

To remove the warning update to the latest matplotlib version (updating to 1.5.0 allowed this in my case). If you use pip, then

 pip install -U matplotlib 
+7
source

I saw the same warning (albeit with Python 3.5) and found a GitHub question about this since August 2015; there you can find a more complete explanation and a command that can fix this:

jupyter kernelspec install-self --user

As follows from the comment on the original question, this is indeed a problem of the obsolete IPython kernel command. I'm not sure how universal this fix is, but this topic explains that it does pretty well!

+2
source

Try updating numpy. You are probably using the old version.

On the command line, this

 conda update numpy 
+1
source

Source: https://habr.com/ru/post/1235378/


All Articles