IPython Notebook-ShimWarning:不推荐使用IPython.kernel包

问题描述 投票:7回答:4

将某些包导入IPython笔记本时,我收到以下消息:

%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

这似乎不会影响结果,但我想解决此错误。我从这里的一些帖子中了解到,此问题将导致IPython-Notebook在升级到Python 4时停止工作。我正在Mac OSX 10.11.1上通过Anaconda运行IPython Notebook版本4.0.4。

我必须承认我对python软件包的安装不是很精明,但是我需要在学校使用它,并认为这将是学习这些东西的好方法。

python macos ipython-notebook anaconda jupyter
4个回答
10
投票
pip install -U matplotlib

[我也看到了相同的警告(尽管使用Python 3.5),但从2015年8月开始发现了关于它的GitHub issue;在那里,您可以找到更完整的说明以及可能解决此问题的命令:


2
投票

尝试更新numpy。您可能正在使用旧版本。


0
投票

我在跑步时遇到此问题


0
投票
from jupyter_client.manager import KernelManager

找到此解决方案here

配置:2020年5月的Python 3.8.1
© www.soinside.com 2019 - 2024. All rights reserved.