跳转到主要内容

从JupyterLab创建Python文件

项目描述

jupyterlab-python-file

Binder PyPI conda-forge npm

从JupyterLab创建Python文件

screenshot

screenshot2

先决条件

  • JupyterLab 1.0+

安装

对于JupyterLab 3.x,可以使用pip安装扩展

pip install jupyterlab-python-file

或使用conda

conda install -c conda-forge jupyterlab-python-file

# or with mamba
mamba install jupyterlab-python-file

对于JupyterLab 1.x和2.x

jupyter labextension install jupyterlab-python-file

开发

注意:您需要NodeJS来构建扩展包。

jlpm命令是JupyterLab附带安装的yarn的版本。您可以使用下面的yarnnpm代替jlpm

# Clone the repo to your local environment
# Change directory to the jupyterlab-python-file directory

# create a new environment
conda create -n jupyterlab-python-file -c conda-forge python nodejs -y
conda activate jupyterlab-python-file

# install the JupyterLab pre-release
python -m pip install --pre jupyterlab

# Install 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

在监视命令运行时,每次保存的更改都将立即在本地构建并可供您的运行中的JupyterLab使用。刷新JupyterLab以在浏览器中加载更改(您可能需要等待几秒钟,直到扩展重建)。

项目详情


下载文件

下载您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分发

jupyterlab-python-file-0.5.5.tar.gz (125.7 kB 查看散列值)

上传时间 源代码

构建分发

jupyterlab_python_file-0.5.5-py3-none-any.whl (68.0 kB 查看散列值)

上传时间 Python 3

由以下支持