一个Jupyter实验室扩展,用于检查与内核之间的消息
jupyterlab-kernelsp的Python项目详细描述
jupyterlab内核
一个JupyterLab扩展,用于检查来自内核的消息。在
先决条件
- 朱庇特实验室
安装
pip install jupyterlab-kernelspy
更新
从jupyterlab3.0开始,扩展以Python包的形式分发。使用相同的Python 用于安装扩展以更新它的包管理器。在
对于JupyterLab 0.34-2.2.x,可以使用以下内容将扩展更新到最新的兼容版本:
^{pr2}$使用
一旦安装了扩展,它应该在笔记本工具栏上添加一个按钮(一个黄色的{:}
图标)。
单击此按钮可打开该笔记本的日志视图。在
贡献
开发
注意:您将需要NodeJS来构建扩展包。在
jlpm
命令是JupyterLab的pinned版本
yarn与JupyterLab一起安装。你可以用
yarn
或npm
代替下面的jlpm
。在
# Clone the repo to your local environment# Change directory to the jupyterlab-kernelspy directory (python package dir)# Install the package in development mode pip install -e . # Link your development version of the extension with JupyterLab jupyter labextension develop . --overwrite # Rebuild extension Typescript source after making changes jlpm run build
您可以监视源目录,并在不同的终端上同时运行JupyterLab,以监视扩展源代码中的更改并自动重建扩展。在
# Watch the source directory in one terminal, automatically rebuilding when needed jlpm run watch # Run JupyterLab in another terminal jupyter lab
运行watch命令后,每个保存的更改都将立即在本地生成,并在运行的JupyterLab中可用。刷新JupyterLab以在浏览器中加载更改(可能需要等待几秒钟才能重建扩展)。在
卸载
pip uninstall jupyterlab-kernelspy jupyter labextension uninstall jupyterlab-kernelspy
- 项目
标签: