Use additional Python packages#
Installing packages at runtime#
JupyterLite provides an additional
piplite layer on top of micropip to install
packages from Python notebooks.
New packages can be downloaded and installed at runtime. For example to install
%pip install -q snowballstemmer
which translates to:
import piplite await piplite.install("snowballstemmer")
Bundling additional packages by default#
At the moment the most reasonable way to make additional packages available by default when starting the Python kernel is to add new packages to the Pyodide distribution.
The process is detailed in the Pyodide documentation.
Once you have added the new package(s) and rebuilt Pyodide, you can configure JupyterLite to use a custom Pyodide distribution.