Skip to main content

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

  1. You select the Python (uv) kernel in JupyterLab
  2. The kernel finds the nearest pyproject.toml by walking up from the notebook's directory
  3. If it can't find one, it creates ones in the notebook's directory
  4. If ipykernel is not already in the project's dependencies, it adds it via uv add
  5. It runs uv run --project <dir> python -m ipykernel_launcher
  6. 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

  1. Setup: pyproject.toml
    • Make sure your project/directory has a pyproject.toml with its dependencies listed.
    • Or, if it can't find a nearby pyproject.toml one will be created.
  2. Open JupyterLab and create or open a notebook in your project directory
  3. Select the Python (uv) kernel from the kernel picker
  4. Your notebook now runs inside your project's uv-managed environment
  5. 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

Metadata

Release files for ipykernel-uv 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipykernel-uv 0.0.2
File Size Uploaded Provenance Actions
ipykernel_uv-0.0.2.tar.gz 91.5 kB Without provenance Details for ipykernel_uv-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ipykernel-uv 0.0.2
File Interpreter ABI Platform Actions
ipykernel_uv-0.0.2-py3-none-any.whl Python 3 none any Details for ipykernel_uv-0.0.2-py3-none-any.whl

Total release size: 97.3 kB

Release files / ipykernel_uv-0.0.2.tar.gz

Download URL ipykernel_uv-0.0.2.tar.gz
Size 91.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4c2b8670621ff43d56fffe793b4a146e6367c90b0fb3245a293e7cb123c71c0c
BLAKE2b-256 checksum
How to use checksums
cd9fd5eda4105ce445d5d8dd423b039bd2f1fc716c0ac5ebfb4fa1aa54dd3aac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / ipykernel_uv-0.0.2-py3-none-any.whl

Download URL ipykernel_uv-0.0.2-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19fdbce80af8747eadafd3bc09036fe5f8752638c80c36dfa812cde1e1fb5061
BLAKE2b-256 checksum
How to use checksums
b81769374d6332de8a0385e3526cad985f64206df8127d15a07942e29211dd6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.14

Security for ipykernel-uv 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page