我在将一些包导入 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 在升级到 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/