Jupyter笔记本:更改活动笔记本内的数据速率限制 [英] Jupyter Notebook: Change Data Rate Limit Inside Active Notebook

查看:485
本文介绍了Jupyter笔记本:更改活动笔记本内的数据速率限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个jupyter笔记本,执行的单元格出现以下错误:

I have a jupyter notebook where an executed cell gives the following error:

超出IOPub数据速率...

IOPub data rate exceeded...

我知道这是一个选项:

jupyter notebook --NotebookApp.iopub_data_rate_limit=1.0e10

但是,我真的更愿意将其与我的import语句和其他笔记本设置一起设置,而不是调整配置文件或启动笔记本时的命令行。有没有一种简单的方法可以做到这一点?

However, I would really prefer to just to set this along with my import statements and other notebook settings instead of tweaking configuration files or command line when starting notebooks. Is there an easy way to do this?

推荐答案

我建议创建一个别名 jn 每次都使用这些设置启动Jupyter笔记本。你一劳永逸地做了一次,之后不必用命令行进行调整。
在UNIX系统下,你运行在终端::

I would recommend creating an alias jn to launch Jupyter notebook with these settings every time. You do it once for all and do not have to tweak with command line after. Under UNIX system you run in terminal ::

alias jn="jupyter notebook --NotebookApp.iopub_data_rate_limit=2147483647"

要在每个会话中启用此别名,您必须将此命令行附加到shell配置文件,默认情况下〜/ .bash_profile

To enable this alias at every session you have to append this command line to your shell config file, by default ~/.bash_profile

如果运行Windows,请检查等效于aliases

If you run Windows check the equivalence to aliases

这篇关于Jupyter笔记本:更改活动笔记本内的数据速率限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆