我安装了 anaconda 发行版,我通常运行 ipython notebook --pylab inline
。我使用 pip install
(windows 8.1) 更新了 ipython
,我不再需要编写 --pylab inline 来启动
我开始在单元格中写入:%matplotlib nbagg
或 matplotlib.use['nbagg']
,但是当我绘制一些东西时它显示这个空框:
我期待交互式绘图框。
ipython 日志显示:
[IPKernelApp] ERROR | No such comm: 7cfe982045bb4d0db0f14deff7258130
最佳答案
我猜这个问题是由于 matplotlib
版本太旧引起的。使用 %matplotlib nbagg
和 ipython>=3.0
需要 matplotlib>=1.4.3
(注意 %matplotlib notebook
和 %matplotlib nbagg
现在是同义词)。
通过 pip install --upgrade matplotlib
更新 matplotlib 可能会解决这个问题。另见我的 issue-7797
在github上。感谢 jenshnielsen 提供此信息。
关于python - 更新 ipython 后出现问题 (%matplotlib nbagg),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29044867/