-
Create a virtual environment called, e.g.,
my-env:$ uv venv my-env -
Install
ipykernelinto it:$ uv pip install -p my-env ipykernel -
Register the kernel so it will show up in Jupyter:
$ uv run -p my-env -m ipykernel install --user --name my-env -
Run Jupyter from anywhere:
$ uvx jupyter lab -
Install packages into the
my-envvirtual environment as required, and they'll turn up in your notebooks:$ uv pip install -p my-env pandas
uv init my-projectcd my-projectuv run --with jupyter jupyter lab- Inside a cell,
!uv add numpy, or, at the command line inside themy-projectdirectory:uv add numpy