Python 如何更改Jupyter笔记本中的执行时间限制?

Python 如何更改Jupyter笔记本中的执行时间限制?,python,jupyter-notebook,Python,Jupyter Notebook,我已经定义了一个python函数(作为.py文件),它以迭代的方式为几十个文件拟合一些科学数据。现在,我正试图将这个函数导入jupyter笔记本,作为另一个脚本的一部分使用,以处理获得的数据。基本上是这样的: from python_file import defined_function filename = 'name of the file' results = defined_function(filename) 这个脚本自然需要几分钟才能在我的机器上结束。但是,在完成之前,我收到

我已经定义了一个python函数(作为.py文件),它以迭代的方式为几十个文件拟合一些科学数据。现在,我正试图将这个函数导入jupyter笔记本,作为另一个脚本的一部分使用,以处理获得的数据。基本上是这样的:

from python_file import defined_function

filename = 'name of the file'

results = defined_function(filename)
这个脚本自然需要几分钟才能在我的机器上结束。但是,在完成之前,我收到一条与时间限制相关的错误消息:

RuntimeError: Execution exceeded time limit, max runtime is 30s
如何更改笔记本中的时间限制?如果有帮助的话,我正在使用ipython版本6.1.0


谢谢

在jupyter\u notebook\u config.py中覆盖NotebookApp.iopub\u data\u rate\u limit=10000000就可以了。请注意,在看到名为jupyter_notebook_config.py的文件,然后继续进行此修复之前,必须先运行第一个jupyter notebook--generate config(针对linux用户)

如果在配置文件中重写它对您不起作用。无论您在配置文件中将NotebookApp.iopub\u data\u rate\u limit=设置为什么,都会出现相同的错误。它不应该已经在正确的地方了。如果没有,请尝试将“NotebookApp.iopub_data_rate_limit=”放在~/.jupyter/jupyter_notebook_config.py