| created | "2025-12-16T00:00:00.000Z" |
| modified | "2026-05-09T00:00:00.000Z" |
| reviewed | "2026-04-25T00:00:00.000Z" |
| name | uv-python-versions |
| description | Install and manage Python interpreter versions with uv. Use when the user mentions installing Python versions, .python-version, uv python, or managing CPython/PyPy. |
| user-invocable | false |
| allowed-tools | Bash, Read, Grep, Glob |
UV Python Version Management
Quick reference for installing and managing Python interpreter versions with UV.
When to Use This Skill
| Use this skill when... | Use a focused sibling instead when... |
|---|
Installing a specific CPython or PyPy interpreter with uv python install | Adding a Python library to a project — use uv-project-management |
Pinning a project to a Python version via .python-version or requires-python | Installing a global Python CLI tool — use uv-tool-management |
| Switching between multiple installed interpreters for testing | Running a script with auto-managed Python — use uv-run |
When This Skill Applies
- Installing specific Python versions
- Switching between multiple Python versions
- Pinning Python versions for projects
- Managing CPython and PyPy interpreters
- Finding and listing installed Python versions
Quick Reference
Installing Python Versions
uv python install
uv python install 3.11
uv python install 3.12
uv python install 3.10 3.11 3.12
uv python install 3.11.5
uv python install cpython@3.11.5
uv python install pypy@3.9
uv python install pypy@3.10
Listing Python Versions
uv python list
uv python list --only-installed
uv python list --verbose
Pinning Python Versions
uv python pin 3.11
uv python pin 3.12.1
uv python pin pypy@3.9
Finding Python Interpreters
uv python find
uv python find 3.11
uv python find 3.12
uv python find pypy
uv python find pypy@3.9
Using Specific Python Versions
uv run --python 3.11 script.py
uv run --python 3.12 pytest
uv venv --python 3.11
uv venv --python 3.10 .venv-py310
uv init --python 3.12 my-project
Python Version Sources
UV searches for Python in this order:
- UV-managed - Installed via
uv python install
- .python-version - Pin file in project directory
- pyproject.toml -
requires-python field
- System Python - Existing system installations
- Environment -
$PATH and standard locations
Version Pinning
.python-version File
uv python pin 3.11
3.11
uv python pin 3.11.5
pyproject.toml
[project]
requires-python = ">=3.11"
Supported Python Implementations
CPython
uv python install 3.11
uv python install cpython@3.11
uv python install cpython@3.11.5
PyPy
uv python install pypy@3.9
uv python install pypy@3.10
Common Commands
uv python install 3.12 && uv python pin 3.12
uv python install 3.10 3.11 3.12
uv python find
uv run python --version
rm -rf ~/.local/share/uv/python/cpython-3.11.5-*
Integration with Projects
Project Initialization
uv init --python 3.11 my-project
cat .python-version
Running Commands
uv run python script.py
uv run --python 3.12 script.py
uv run --python python3 script.py
Multi-Version Testing
uv run --python 3.10 pytest
uv run --python 3.11 pytest
uv run --python 3.12 pytest
uv venv --python 3.10 .venv-py310
uv venv --python 3.11 .venv-py311
uv venv --python 3.12 .venv-py312
Key Features
- Fast downloads: Parallel downloads with caching
- Automatic: Downloads versions on-demand
- Isolated: UV-managed versions don't conflict with system Python
- Portable: Uses standalone Python distributions
- Cross-platform: Works on Linux, macOS, and Windows
See Also
uv-project-management - Using pinned Python versions in projects
uv-workspaces - Python versions in monorepos
python-testing - Testing across multiple Python versions
References