繁体   English   中英

更新ipython后出现的问题(%matplotlib nbagg)

[英]Troubles after updating ipython (%matplotlib nbagg)

我安装了 anaconda 发行版,我通常运行ipython notebook --pylab inline 我使用pip install (windows 8.1) 更新了ipython并且我不再需要编写 --pylab inline 来启动

我开始在单元格中写入: %matplotlib nbaggmatplotlib.use['nbagg'] ,但是当我绘制某些内容时,它会显示这个空框:在此处输入图片说明

我期待交互式绘图框。

ipython 日志显示:

[IPKernelApp] ERROR | No such comm: 7cfe982045bb4d0db0f14deff7258130

我猜这个问题是由太旧版本的matplotlib引起的。 %matplotlib nbaggipython>=3.0需要matplotlib>=1.4.3 (请注意, %matplotlib notebook%matplotlib nbagg现在是同义词)。

通过pip install --upgrade matplotlib更新 matplotlib 可能会解决这个问题。 另请参阅我在 github 上的issue-7797 感谢jenshnielsen提供此信息。

应该同时更新 matplotlib 和 ipython ...

sudo pip install -U ipython
sudo pip install -U matplotlib

在窗户上:

pip install --upgrade matplotlib
pip install --upgrade ipython

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM