I think the package manager uv (by astral) simplifies working with jupyter a lot, and therefore I’d like to share here some snippets that I find useful.
uv can be installed via: Installation | uv
Installation-and-first-run, as well as all future runs, is the same command:
uvx jupyter lab
Choosing a python version:
uvx --python 3.10 jupyter lab
as well as:
uvx --python 3.13 jupyter lab
using a python package (e.g. anywidget):
uvx --python 3.12 --with anywidget jupyter lab
and finally, installing packages within a notebook cell
!uv pip install matplotlib
It’s worth mentioning that the above snippets are great for prototyping ideas or running one-off scripts that don’t live within a project.
I’ve also made a twitter thread about this with some screen recording benchmarks:
Feel free to share other ideas about using Jupyter with uv in this thread!