python - IPython 笔记本 - ShimWarning : The `IPython.kernel` package has been deprecated

标签 python macos ipython-notebook anaconda jupyter

我在将一些包导入 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)

enter image description here

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

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

最佳答案

我有一个类似的警告是由以下行引起的:

%matplotlib notebook

删除最新版本 matplotlib 的警告更新(更新到 1.5.0 解决了我的问题)。如果你使用 pip,那么

pip install -U matplotlib

关于python - IPython 笔记本 - ShimWarning : The `IPython.kernel` package has been deprecated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33571421/

相关文章:

ipython - ipython 笔记本中的 tikz : no drawing created. 相反,获取消息 "No image generated."

python - JSON 输出不正确 - Python 项目

python - BeautifulSoup 返回意外的额外空间

python - 如何扩展 Pandas Dataframe 以创建使用 csv 文件名初始化的自定义类?

ios - Swift 泛型函数

macos - 在 OSX 上自动启动 ngrok

python - 破坏性堆栈迭代

Swift:在 Mac 上检索文件图标时出现问题

python - 如何在 jupyter-notebook 中逐行执行代码?

ipython - 如何在IPython Notebook中对齐小部件按钮