用于依赖关系管理和优化的JupyterLab扩展
jupyterlab-requirements的Python项目详细描述
Juterpylab要求
JupyterLab中的依赖管理和优化。在
关于
此扩展为JupyterLab笔记本提供依赖项管理。在
该项目的主要目标如下:
- 在不离开笔记本的情况下管理笔记本需求
- 为每个笔记本电脑提供一个独特且优化的*环境
注意:需求是使用Thoth解析引擎优化的
要求
- JupyterLab>;=3.0
安装
pip install jupyterlab-requirements^{pr2}$
故障排除
如果您看到前端扩展,但它不工作,请检查 启用服务器扩展:
jupyter server extension list
如果服务器扩展已安装并启用,但您没有看到 前端扩展,检查前端扩展是否已安装:
jupyter labextension list
使用
为根据您的要求运行笔记本而创建的Virtualenv创建于:
~/.local/share/thoth/kernels/{kernel_name}
当前的开发工作集中在创建第一个UI上。在
贡献
开发安装
注意:您将需要NodeJS来构建扩展包。在
jlpm
命令是JupyterLab的pinned版本
yarn与JupyterLab一起安装。你可以用
yarn
或npm
代替下面的jlpm
。在
# Clone the repo to your local environment# Change directory to the jupyterlab-requirements directory# Install package in development mode pip install --use-feature=2020-resolver -e . # Link your development version of the extension with JupyterLab jupyter labextension develop . --overwrite jupyter serverextension enable --py jupyterlab-requirements --sys-prefix # 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以在浏览器中加载更改(可能需要等待几秒钟才能重建扩展)。在
默认情况下,jlpm run build
命令生成此扩展的源映射,以便使用浏览器开发工具更容易调试。要同时为JupyterLab核心扩展生成源映射,可以运行以下命令:
jupyter lab build --minimize=False
卸载
pip uninstall jupyterlab-requirements
- 项目
标签: