ipykernel-uv
A Jupyter kernel that uses uv to automatically manage
Python environments for your projects. When you select this kernel, it finds the nearest
pyproject.toml, syncs the project's dependencies with uv, and launches IPython inside
that environment — no manual virtual environment management required.
How it works
- You select the Python (uv) kernel in JupyterLab
- The kernel finds the nearest
pyproject.tomlby walking up from the notebook's directory - If it can't find one, it creates ones in the notebook's directory
- If
ipykernelis not already in the project's dependencies, it adds it viauv add - It runs
uv run --project <dir> python -m ipykernel_launcher - uv syncs the project's environment and starts IPython inside it
This means your notebook automatically has access to all the dependencies declared in your
project's pyproject.toml. The ipykernel package is added to your project's dependencies
automatically if not already present.
Requirements
- Python >= 3.10
- uv installed and available on PATH
Installation
Install the package:
pip install ipykernel-uv
Or with uv:
uv pip install ipykernel-uv
Then register the kernel spec. Choose one of the following options:
# Install for the current user
python -m ipykernel_uv install --user
# Install into the current virtual environment
python -m ipykernel_uv install --sys-prefix
# Install into a specific prefix
python -m ipykernel_uv install --prefix /path/to/prefix
Usage
- Setup:
pyproject.toml- Make sure your project/directory has a
pyproject.tomlwith its dependencies listed. - Or, if it can't find a nearby
pyproject.tomlone will be created.
- Make sure your project/directory has a
- Open JupyterLab and create or open a notebook in your project directory
- Select the Python (uv) kernel from the kernel picker
- Your notebook now runs inside your project's uv-managed environment
- You can add new package using
!uv add <project>inside a notebook cell.
Install options
| Flag | Description |
|---|---|
--name |
Kernel name (default: python3-uv) |
--display-name |
Display name in Jupyter (default: Python (uv)) |
--user |
Install for the current user |
--sys-prefix |
Install into sys.prefix (e.g. the active virtual environment) |
--prefix |
Install into a specific prefix directory |
Development
# Clone the repo
git clone https://github.com/jupyter-ai-contrib/ipykernel-uv.git
cd ipykernel-uv
# Sync the development environment
uv sync
# Install the kernel spec locally
uv run python -m ipykernel_uv install --sys-prefix
License
BSD-3-Clause
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipykernel_uv-0.0.2.tar.gz.
File metadata
- Download URL: ipykernel_uv-0.0.2.tar.gz
- Upload date:
- Size: 91.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c2b8670621ff43d56fffe793b4a146e6367c90b0fb3245a293e7cb123c71c0c
|
|
| MD5 |
2b775fa6a21b875d587c52183de1f74c
|
|
| BLAKE2b-256 |
cd9fd5eda4105ce445d5d8dd423b039bd2f1fc716c0ac5ebfb4fa1aa54dd3aac
|
File details
Details for the file ipykernel_uv-0.0.2-py3-none-any.whl.
File metadata
- Download URL: ipykernel_uv-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19fdbce80af8747eadafd3bc09036fe5f8752638c80c36dfa812cde1e1fb5061
|
|
| MD5 |
5b8f7a96c5a4b7207dbedb35cf2b4026
|
|
| BLAKE2b-256 |
b81769374d6332de8a0385e3526cad985f64206df8127d15a07942e29211dd6d
|