在Vscode Jupyter中的长时间运行单元:重新连接到内核

huangapple go评论75阅读模式
英文:

Long-running cell in Vscode Jupyter: Reconnecting to the kernel

问题

每当我在Vscode中运行一个需要很长时间才能完成的Jupyter单元格时,它似乎永远无法完成运行该单元格。

在Vscode底部,我会看到通知

> 重新连接到内核myvenv(Python 3.8.16)

这个问题可能是因为单元格运行时间超过了可配置的时间而导致的吗?如果是这样,是否有办法增加此超时值?

当单元格在约5分钟内完成运行时,就没有问题。

Pip包:jupyter_client==7.4.8jupyter_core==5.1.1jupyterlab-widgets==3.0.5

Vscode扩展Jupyter版本为v2023.2.1000541047

英文:

Whenever I run a Jupyter cell in Vscode that takes a long time to complete, it does not ever seem to complete running the cell.

At the bottom of Vscode, I will see the notification

> Reconnecting to the kernel myvenv (Python 3.8.16)

Is it possible that this issue is due to the cell taking longer than a configurable amout of time to complete running? If so, is there a way to increase this timeout value?

There is no problem when the cell completes running in ~5mins.

Pip packages: jupyter_client==7.4.8, jupyter_core==5.1.1, jupyterlab-widgets==3.0.5.

Vscode extension Jupyter is on v2023.2.1000541047

答案1

得分: 1

GitHub上有许多关于这个问题的类似情况。请尝试卸载并安装最新版本的jupyter包。还可以使用 pip install --upgrade ipykernel 来升级 ipykernel

关于你提到的时间限制,下面的设置是一个选项。

英文:

There are many similar issues on GitHub about this issue. Please try to uninstall and install the latest version of jupyter package. Also use pip install --upgrade ipykernel to upgrade ipykernel.

Regarding the time limit you said, the setting below is an option.

在Vscode Jupyter中的长时间运行单元:重新连接到内核

huangapple
  • 本文由 发表于 2023年2月27日 07:58:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/75575765.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定