Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

Uv is commonly used to install not just Python packages, but also Python interpreters. This will not “just work” with Nix as in other environments because of things like ELF interpreter paths, RPATHs & more.

These packages allows you to use Python interpreter versions unsupported by nixpkgs for impure development or with tooling like uv2nix.

uv-python.nix provides expressions to use these pre-packaged Python interpreters in a Nix environment.

Installation

Classic Nix

Documentation examples in uv-python.nix are using Flakes for convenience.

You can just as easily import uv-python.nix without using Flakes:

let
  pkgs = import <nixpkgs> { };
  inherit (pkgs) lib;

  uv-pythons = pkgs.callPackage (import (builtins.fetchGit {
    url = "https://github.com/pyproject-nix/uv-python.nix.git";
  }) { }) { };

  python = uv-python.packages.${system}."cpython-3.10";
in
  ...

Flakes

let
  python = uv-python.packages.${system}."cpython-3.10";
in
  ...

Interpreter attributes

  • cpython-3.8
  • cpython-3.8+debug
  • cpython-3.8.2
  • cpython-3.8.2+debug
  • cpython-3.8.3
  • cpython-3.8.3+debug
  • cpython-3.8.5
  • cpython-3.8.5+debug
  • cpython-3.8.6
  • cpython-3.8.6+debug
  • cpython-3.8.7
  • cpython-3.8.7+debug
  • cpython-3.8.8
  • cpython-3.8.8+debug
  • cpython-3.8.9
  • cpython-3.8.9+debug
  • cpython-3.8.10
  • cpython-3.8.10+debug
  • cpython-3.8.11
  • cpython-3.8.11+debug
  • cpython-3.8.12
  • cpython-3.8.12+debug
  • cpython-3.8.13
  • cpython-3.8.13+debug
  • cpython-3.8.14
  • cpython-3.8.14+debug
  • cpython-3.8.15
  • cpython-3.8.15+debug
  • cpython-3.8.16
  • cpython-3.8.16+debug
  • cpython-3.8.17
  • cpython-3.8.17+debug
  • cpython-3.8.18
  • cpython-3.8.18+debug
  • cpython-3.8.19
  • cpython-3.8.19+debug
  • cpython-3.8.20
  • cpython-3.8.20+debug
  • cpython-3.9
  • cpython-3.9+debug
  • cpython-3.9.0
  • cpython-3.9.0+debug
  • cpython-3.9.1
  • cpython-3.9.1+debug
  • cpython-3.9.2
  • cpython-3.9.2+debug
  • cpython-3.9.3
  • cpython-3.9.3+debug
  • cpython-3.9.4
  • cpython-3.9.4+debug
  • cpython-3.9.5
  • cpython-3.9.5+debug
  • cpython-3.9.6
  • cpython-3.9.6+debug
  • cpython-3.9.7
  • cpython-3.9.7+debug
  • cpython-3.9.10
  • cpython-3.9.10+debug
  • cpython-3.9.11
  • cpython-3.9.11+debug
  • cpython-3.9.12
  • cpython-3.9.12+debug
  • cpython-3.9.13
  • cpython-3.9.13+debug
  • cpython-3.9.14
  • cpython-3.9.14+debug
  • cpython-3.9.15
  • cpython-3.9.15+debug
  • cpython-3.9.16
  • cpython-3.9.16+debug
  • cpython-3.9.17
  • cpython-3.9.17+debug
  • cpython-3.9.18
  • cpython-3.9.18+debug
  • cpython-3.9.19
  • cpython-3.9.19+debug
  • cpython-3.9.20
  • cpython-3.9.20+debug
  • cpython-3.9.21
  • cpython-3.9.21+debug
  • cpython-3.9.22
  • cpython-3.9.22+debug
  • cpython-3.9.23
  • cpython-3.9.23+debug
  • cpython-3.9.24
  • cpython-3.9.24+debug
  • cpython-3.9.25
  • cpython-3.9.25+debug
  • cpython-3.10
  • cpython-3.10+debug
  • cpython-3.10.0
  • cpython-3.10.0+debug
  • cpython-3.10.2
  • cpython-3.10.2+debug
  • cpython-3.10.3
  • cpython-3.10.3+debug
  • cpython-3.10.4
  • cpython-3.10.4+debug
  • cpython-3.10.5
  • cpython-3.10.5+debug
  • cpython-3.10.6
  • cpython-3.10.6+debug
  • cpython-3.10.7
  • cpython-3.10.7+debug
  • cpython-3.10.8
  • cpython-3.10.8+debug
  • cpython-3.10.9
  • cpython-3.10.9+debug
  • cpython-3.10.11
  • cpython-3.10.11+debug
  • cpython-3.10.12
  • cpython-3.10.12+debug
  • cpython-3.10.13
  • cpython-3.10.13+debug
  • cpython-3.10.14
  • cpython-3.10.14+debug
  • cpython-3.10.15
  • cpython-3.10.15+debug
  • cpython-3.10.16
  • cpython-3.10.16+debug
  • cpython-3.10.17
  • cpython-3.10.17+debug
  • cpython-3.10.18
  • cpython-3.10.18+debug
  • cpython-3.10.19
  • cpython-3.10.19+debug
  • cpython-3.10.20
  • cpython-3.10.20+debug
  • cpython-3.11
  • cpython-3.11+debug
  • cpython-3.11.1
  • cpython-3.11.1+debug
  • cpython-3.11.3
  • cpython-3.11.3+debug
  • cpython-3.11.4
  • cpython-3.11.4+debug
  • cpython-3.11.5
  • cpython-3.11.5+debug
  • cpython-3.11.6
  • cpython-3.11.6+debug
  • cpython-3.11.7
  • cpython-3.11.7+debug
  • cpython-3.11.8
  • cpython-3.11.8+debug
  • cpython-3.11.9
  • cpython-3.11.9+debug
  • cpython-3.11.10
  • cpython-3.11.10+debug
  • cpython-3.11.11
  • cpython-3.11.11+debug
  • cpython-3.11.12
  • cpython-3.11.12+debug
  • cpython-3.11.13
  • cpython-3.11.13+debug
  • cpython-3.11.14
  • cpython-3.11.14+debug
  • cpython-3.11.15
  • cpython-3.11.15+debug
  • cpython-3.12
  • cpython-3.12+debug
  • cpython-3.12.0
  • cpython-3.12.0+debug
  • cpython-3.12.1
  • cpython-3.12.1+debug
  • cpython-3.12.2
  • cpython-3.12.2+debug
  • cpython-3.12.3
  • cpython-3.12.3+debug
  • cpython-3.12.4
  • cpython-3.12.4+debug
  • cpython-3.12.5
  • cpython-3.12.5+debug
  • cpython-3.12.6
  • cpython-3.12.6+debug
  • cpython-3.12.7
  • cpython-3.12.7+debug
  • cpython-3.12.8
  • cpython-3.12.8+debug
  • cpython-3.12.9
  • cpython-3.12.9+debug
  • cpython-3.12.10
  • cpython-3.12.10+debug
  • cpython-3.12.11
  • cpython-3.12.11+debug
  • cpython-3.12.12
  • cpython-3.12.12+debug
  • cpython-3.12.13
  • cpython-3.12.13+debug
  • cpython-3.13
  • cpython-3.13+debug
  • cpython-3.13+freethreaded
  • cpython-3.13+freethreaded+debug
  • cpython-3.13.0
  • cpython-3.13.0+debug
  • cpython-3.13.0+freethreaded
  • cpython-3.13.0+freethreaded+debug
  • cpython-3.13.1
  • cpython-3.13.1+debug
  • cpython-3.13.1+freethreaded
  • cpython-3.13.1+freethreaded+debug
  • cpython-3.13.2
  • cpython-3.13.2+debug
  • cpython-3.13.2+freethreaded
  • cpython-3.13.2+freethreaded+debug
  • cpython-3.13.3
  • cpython-3.13.3+debug
  • cpython-3.13.3+freethreaded
  • cpython-3.13.3+freethreaded+debug
  • cpython-3.13.4
  • cpython-3.13.4+debug
  • cpython-3.13.4+freethreaded
  • cpython-3.13.4+freethreaded+debug
  • cpython-3.13.5
  • cpython-3.13.5+debug
  • cpython-3.13.5+freethreaded
  • cpython-3.13.5+freethreaded+debug
  • cpython-3.13.6
  • cpython-3.13.6+debug
  • cpython-3.13.6+freethreaded
  • cpython-3.13.6+freethreaded+debug
  • cpython-3.13.7
  • cpython-3.13.7+debug
  • cpython-3.13.7+freethreaded
  • cpython-3.13.7+freethreaded+debug
  • cpython-3.13.8
  • cpython-3.13.8+debug
  • cpython-3.13.8+freethreaded
  • cpython-3.13.8+freethreaded+debug
  • cpython-3.13.9
  • cpython-3.13.9+debug
  • cpython-3.13.9+freethreaded
  • cpython-3.13.9+freethreaded+debug
  • cpython-3.13.10
  • cpython-3.13.10+debug
  • cpython-3.13.10+freethreaded
  • cpython-3.13.10+freethreaded+debug
  • cpython-3.13.11
  • cpython-3.13.11+debug
  • cpython-3.13.11+freethreaded
  • cpython-3.13.11+freethreaded+debug
  • cpython-3.13.12
  • cpython-3.13.12+debug
  • cpython-3.13.12+freethreaded
  • cpython-3.13.12+freethreaded+debug
  • cpython-3.14
  • cpython-3.14+debug
  • cpython-3.14+freethreaded
  • cpython-3.14+freethreaded+debug
  • cpython-3.14.0
  • cpython-3.14.0+debug
  • cpython-3.14.0+freethreaded
  • cpython-3.14.0+freethreaded+debug
  • cpython-3.14.1
  • cpython-3.14.1+debug
  • cpython-3.14.1+freethreaded
  • cpython-3.14.1+freethreaded+debug
  • cpython-3.14.2
  • cpython-3.14.2+debug
  • cpython-3.14.2+freethreaded
  • cpython-3.14.2+freethreaded+debug
  • cpython-3.14.3
  • cpython-3.14.3+debug
  • cpython-3.14.3+freethreaded
  • cpython-3.14.3+freethreaded+debug
  • cpython-3.15.0
  • cpython-3.15.0+debug
  • cpython-3.15.0+freethreaded
  • cpython-3.15.0+freethreaded+debug
  • graalpy-3.8
  • graalpy-3.8.2
  • graalpy-3.8.5
  • graalpy-3.10
  • graalpy-3.10.0
  • graalpy-3.11
  • graalpy-3.11.0
  • graalpy-3.12
  • graalpy-3.12.0
  • pypy-3.8
  • pypy-3.8.12
  • pypy-3.8.13
  • pypy-3.8.15
  • pypy-3.8.16
  • pypy-3.9
  • pypy-3.9.10
  • pypy-3.9.12
  • pypy-3.9.15
  • pypy-3.9.16
  • pypy-3.9.17
  • pypy-3.9.18
  • pypy-3.9.19
  • pypy-3.10
  • pypy-3.10.12
  • pypy-3.10.13
  • pypy-3.10.14
  • pypy-3.10.16
  • pypy-3.11
  • pypy-3.11.11
  • pypy-3.11.13
  • pypy-3.11.15