Jupyter notebook Jupyter笔记本中超过IOPub数据速率(查看图像时)
我想在Jupyter笔记本中查看图像。它是一个9.9MB.png文件Jupyter notebook Jupyter笔记本中超过IOPub数据速率(查看图像时),jupyter-notebook,ipython,jupyter,Jupyter Notebook,Ipython,Jupyter,我想在Jupyter笔记本中查看图像。它是一个9.9MB.png文件 from IPython.display import Image Image(filename='path_to_image/image.png') 我得到以下错误: IOPub data rate exceeded. The notebook server will temporarily stop sending output to the client in order to avoid crashing it.
from IPython.display import Image
Image(filename='path_to_image/image.png')
我得到以下错误:
IOPub data rate exceeded.
The notebook server will temporarily stop sending output
to the client in order to avoid crashing it.
有点令人惊讶
这是预期的吗?是否有简单的解决方案
(错误消息建议更改
--NotebookApp.iopub\u data\u rate\u limit
中的限制)我使用networkx
和bokeh
这在Windows 7()中适用:
$jupyter笔记本--生成配置
c.NotebookApp.iopub\u data\u rate\u limit
c.NotebookApp.iopub\u data\u rate\u limit=1000000
,并将其更改为更高的默认速率。l使用c.NotebookApp.iopub\u数据\u比率\u限制=10000000
5.1版本中得到解决
更新:
Jupyter笔记本现在已打开。这个问题本应得到解决。使用conda或pip升级。尝试以下方法:
jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10
或者这个:
yourTerminal:prompt> jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10
通过在
Anaconda
PowerShell
或提示符中键入'jupyter notebook--NotebookApp.iopub\u data\u rate\u limit=1.0e10'
,jupyter笔记本将以新配置打开。现在尝试运行您的查询。对Windows(10)用户的一些其他建议:
(base) C:\Users\mobarget\Google Drive\Jupyter Notebook>jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10
删除打印语句也可以解决此问题。
除了加载图像外,当代码以高速连续打印时也会发生此错误,这会导致错误“IOPub数据速率已超过”。例如,如果某个for循环中有一个print语句被调用超过1000次。创建配置文件后,可以运行
jupiter notebook
;由于jupyter\u notebook\u config.py已写入您的jupyter文件夹(对于我:C:\Users\nnd\.jupyter\jupyter\u notebook\u config.p);Jupyter将获取您的更改。如果无法从cmd.exe(windows 10)运行Jupyter笔记本,请尝试从“Anaconda提示符”(如果已安装)执行此操作。@Itay Livni:我的windows命令行无法识别命令$Jupyter notebook--generate config
,并表示该命令错误或找不到。我有Windows10。有什么建议吗?@artre笔记本--应该键入generate config
。不是美元sign@artre您应该浏览到jupyter、exe的位置,然后运行上面提供的命令。对我来说,这是在\documents\anaconda2\scripts
中,如果你只是在寻找一个临时解决方案,这是最简单的方法。如果可以,我会再次投票赞成使用科学记数法。@TomaszGandor尽管这样做,它现在是一个浮点,而不是一个整数。这通常会产生不良影响,如果你使用Anaconda用户界面打开Jupyter笔记本,你在哪里可以运行这些代码?有人能帮你吗?我一直在想把这个放在哪里?