Skip to main content

Add your description here

Project description

uv-jupyter-kernel

Script to configure Jupyter kernels that use the uv environment and dependency manager. It allows you to create isolated kernels for different Python versions, making it easier to use Jupyter with controlled and reproducible environments.

Requirements

  • Some Jupyter client (e.g., VSCode extension)
  • uv installed and available in the PATH

Usage

uvx uv-jupyter-kernel --versions 3.13 3.12

By default, the script configures kernels for Python versions 3.13 and 3.12. You can specify other versions by passing them as arguments.

This will create (or update) kernel files at ~/.local/share/jupyter/kernels/uv-<version>/kernel.json, allowing you to select the corresponding kernel for the desired Python version within Jupyter.

What does the script do?

  • Locates the uv executable on the system.
  • For each specified Python version, creates a Jupyter kernel that:
    • Ephemerally installs ipykernel and starts the executor itself.
    • Ensures the uv PATH is available in the kernel environment.
    • Allows each notebook to run in an independent, ephemeral, and isolated environment.

Advantages

  • The only thing that needs to be available initially is uv.
  • Ephemeral environments: each notebook has its own and can install new dependencies with uv pip install; when Jupyter is restarted, the environment is reset.
  • No need to install Jupyter in the environment: less chance of dependency conflicts.
  • Shared cache: each thing can be downloaded only once and then reused.

Disadvantages

  • Higher disk usage if your system does not support hardlinks (e.g., Termux on Android)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uv_jupyter_kernel-0.2.3.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uv_jupyter_kernel-0.2.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file uv_jupyter_kernel-0.2.3.tar.gz.

File metadata

  • Download URL: uv_jupyter_kernel-0.2.3.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for uv_jupyter_kernel-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4b5057f70887fa4a062d21031254c373e493fcb136b6cd0ac2f1cd68d54de67f
MD5 a9afd56e77c2432a1be5095b71dfc73b
BLAKE2b-256 048a6d6a15c1138ab4af3f1b045269d5eab035966a9cf4e6508caa58b328670a

See more details on using hashes here.

File details

Details for the file uv_jupyter_kernel-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for uv_jupyter_kernel-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ca4f2586392ccda3a6feaee3eadf55a01df1f5d6decb377ecc378fe58de3d379
MD5 cb8151eb91e44f06b76365b5afb76cfd
BLAKE2b-256 ad65c48bbb4c0ceea54753c66c73e8dca56266542b12fe18e58ce8d4a195ea2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page