笔记本7中的服务器导入#
Notebook 7现在基于Jupyter服务器,允许用户运行多个Jupyter前端(例如Notebook、JupyterLab、NBClassic等)。在同一台服务器上。
在Notebook 7之前,Classic Notebook服务器在 notebook
包裹。这意味着可以从 notebook
包,例如:
from notebook.auth import passwd
passwd("foo")
或者:
from notebook import notebookapp
notebookapp.list_running_servers()
在笔记本7中,这些服务器模块现在由 jupyter_server
包裹。上面的代码片段应该更新为:
from jupyter_server.auth import passwd
passwd("foo")
以及:
from jupyter_server import serverapp
serverapp.list_running_servers()
这些只是示例,因此您可能需要调整您的使用 notebook
根据您正在使用的特定服务器模块进行导入。