JupyterLite Core

raw JSON →
0.7.4 verified Fri May 01 auth: no python

JupyterLite is a JupyterLab distribution that runs entirely in the browser, powered by WebAssembly. The jupyterlite-core package provides the CLI and build tools to create and deploy JupyterLite sites. Current version 0.7.4, requires Python >=3.10. Follows irregular release cadence with occasional alphas.

pip install jupyterlite-core
error jupyter: command not found
cause JupyterLite CLI is not installed in the active Python environment.
fix
Run 'pip install jupyterlite-core' and ensure the environment's bin/Scripts directory is in PATH.
error TypeError: __init__() got an unexpected keyword argument 'quiet'
cause Incompatible version of jupyterlite-core or a dependency; often caused by mixing versions from PyPI and npm.
fix
Upgrade jupyterlite-core: 'pip install --upgrade jupyterlite-core'. If using conda, ensure consistent channel.
error ModuleNotFoundError: No module named 'jupyterlite'
cause Attempting to import from jupyterlite-core directly as 'import jupyterlite' does not work; the package does not expose a top-level module.
fix
Use CLI through 'jupyter lite' commands or import specific submodules like 'from jupyterlite_core import ...' (note underscore).
gotcha jupyter lite add currently has limited support; not all JupyterLab extensions can be added. Check extension compatibility before assuming it works.
fix Use jupyter lite add only for core-compatible extensions. Test in a staging environment.
gotcha CLI commands must be run from a directory containing a jupyter-lite.json config file, or you must specify --site-dir. Otherwise the command may fail or produce unexpected results.
fix Run 'jupyter lite init --site-dir ./public' first, then all commands from that directory or with --site-dir.
deprecated The 'jupyter lite build' command's --output-dir flag was renamed to --site-dir in v0.7.0. Using --output-dir still works but emits a deprecation warning.
fix Use --site-dir instead of --output-dir.

Initialize, add packages, and build a JupyterLite site programmatically (using os.system for clarity). For CLI usage, run directly from terminal.

import os
# Initialize a JupyterLite site
os.system('jupyter lite init --site-dir ./public')
# Add extra piplite packages
exit_code = os.system('jupyter lite add --source-url https://... @jupyterlab/theme-light-extension')
# Build the site
os.system('jupyter lite build --site-dir ./public')