You can install jupyterlite-sphinx with pip:

pip install jupyterlite-sphinx

jupyterlite-sphinx is also available on conda-forge. You can install it with conda or mamba:

# with conda
conda install -c conda-forge jupyterlite-sphinx

# with mamba
mamba install -c conda-forge jupyterlite-sphinx

then you need to add the jupyterlite-sphinx extension to your file of your sphinx docs:

extensions = [
    # And other sphinx extensions
    # ...

JupyterLite should automatically show up in your built online documentation. To preview it locally, you can navigate to the build directory (e.g. _build/html) and use python -m http.server to serve the site.


By default jupyterlite-sphinx does not install a Python kernel. If you would like have a Python kernel available in your docs you can install either jupyterlite-pyodide-kernel or jupyterlite-xeus-python with pip:

# to install the Python kernel based on Pyodide
pip install jupyterlite-pyodide-kernel

# to install the Python kernel based on Xeus Python
pip install jupyterlite-xeus-python