如何正确关闭 IPython Notebook? [英] How to close IPython Notebook properly?

查看:32
本文介绍了如何正确关闭 IPython Notebook?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何正确关闭IPython Notebook?

How to close IPython Notebook properly?

目前,我只是关闭浏览器选项卡,然后在终端中使用 Ctrl+C.
不幸的是,exit() 和勾选 Kill kernel after exit 都没有帮助(它们确实会杀死内核,但不会退出 iPython).

Currently, I just close the browser tabs and then use Ctrl+C in the terminal.
Unfortunately, neither exit() nor ticking Kill kernel upon exit does help (they do kill the kernel they but don't exit the iPython).

推荐答案

目前没有比终端中的 Ctrl+C 更好的方法了.

There isn't currently a better way to do it than Ctrl+C in the terminal.

我们正在考虑如何显式关闭,但笔记本作为单用户应用程序(用户可以自由停止)和多用户服务器(只有管理员)之间存在一些紧张应该能够阻止它.我们还没有完全弄清楚如何处理这些差异.

We're thinking about how to have an explicit shutdown, but there's some tension between the notebook as a single-user application, where the user is free to stop it, and as a multi-user server, where only an admin should be able to stop it. We haven't quite worked out how to handle the differences yet.

(对于未来的读者,这是 0.12 发布和 0.13 正在开发的情况.)

(For future readers, this is the situation with 0.12 released and 0.13 in development.)

2017 年 12 月更新

IPython Notebook 已成为 Jupyter Notebook.最近的版本添加了一个 jupyter notebook stop shell 命令,该命令将关闭在该系统上运行的服务器.如果不是默认端口 8888,您可以在命令行中传递端口号.

The IPython Notebook has become the Jupyter Notebook. A recent version has added a jupyter notebook stop shell command which will shut down a server running on that system. You can pass the port number at the command line if it's not the default port 8888.

您还可以使用 nbmanager,这是一个桌面应用程序,可以显示正在运行的服务器并关闭它们.

You can also use nbmanager, a desktop application which can show running servers and shut them down.

最后,我们正在努力添加:

Finally, we are working on adding:

  • 如果您在指定时间内不使用服务器,它会自动关闭服务器的配置选项.
  • 用户界面中用于关闭服务器的按钮.(我们知道花了这么长时间有点疯狂.更改 UI 是有争议的.)

这篇关于如何正确关闭 IPython Notebook?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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