Installation#

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 conf.py file of your sphinx docs:

extensions = [
    'jupyterlite_sphinx',
    # 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.

Note

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 with pip:

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

# to load Xeus-based kernels
pip install jupyterlite-xeus