在将一些包导入到IPython-Notebook中时,我收到以下消息:
%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)

这似乎不会影响结果,但我想解决这个错误。我从这里的一些帖子中了解到,这个问题将导致IPython-Notebook在升级到Python4时停止工作。我在MacOSX10.11.1上通过Anaconda运行IPython笔记本4.0.4版。
我必须承认我对python包的安装不是很精通,但我需要在学校使用它,并且认为这是一个学习这些东西的好方法。
发布于 2015-11-20 16:56:16
我收到了类似的警告,它是由这行代码引起的:
%matplotlib notebook为了删除警告,更新到matplotlib的最新版本(在我的例子中更新到1.5.0解决了这个问题)。如果您使用pip,那么
pip install -U matplotlib发布于 2016-02-08 10:33:13
我看到了同样的警告(尽管是在Python3.5中),并在2015年8月找到了关于它的GitHub issue;在那里你可以找到更完整的解释和可能解决这个问题的命令:
jupyter kernelspec install-self --user
正如对原始问题的评论所暗示的那样,这确实是一个被弃用的IPython内核命令的问题。我不确定它有多通用,但这个线程解释了它做得很好!
发布于 2020-05-11 14:15:10
我在跑步的时候遇到了这个问题
help("modules")以下操作修复了该问题:
from jupyter_client.manager import KernelManager找到此解决方案here
配置: Python 3.8.1,2020年5月
https://stackoverflow.com/questions/33571421
复制相似问题