uv-python-versions
Install and manage Python interpreter versions with uv. Use when the user mentions installing Python versions, .python-version, uv python, or managing CPython/PyPy.
What this skill does
# 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 ```bash # Install latest Python uv python install # Install specific version uv python install 3.11 uv python install 3.12 uv python install 3.10 3.11 3.12 # Install exact version uv python install 3.11.5 uv python install [email protected] # Install PyPy uv python install [email protected] uv python install [email protected] ``` ### Listing Python Versions ```bash # List all available versions uv python list # List only installed versions uv python list --only-installed # List with verbose details uv python list --verbose ``` ### Pinning Python Versions ```bash # Pin version for current project uv python pin 3.11 uv python pin 3.12.1 # Pin PyPy uv python pin [email protected] # Pin with version file # Creates/updates .python-version ``` ### Finding Python Interpreters ```bash # Find any Python installation uv python find # Find specific version uv python find 3.11 uv python find 3.12 # Find PyPy uv python find pypy uv python find [email protected] ``` ### Using Specific Python Versions ```bash # In project commands uv run --python 3.11 script.py uv run --python 3.12 pytest # Creating virtual environments uv venv --python 3.11 uv venv --python 3.10 .venv-py310 # Initializing projects uv init --python 3.12 my-project ``` ## Python Version Sources UV searches for Python in this order: 1. **UV-managed** - Installed via `uv python install` 2. **.python-version** - Pin file in project directory 3. **pyproject.toml** - `requires-python` field 4. **System Python** - Existing system installations 5. **Environment** - `$PATH` and standard locations ## Version Pinning ### .python-version File ```bash # Pin creates this file uv python pin 3.11 # File contents 3.11 # Exact version uv python pin 3.11.5 ``` ### pyproject.toml ```toml [project] requires-python = ">=3.11" # UV respects this constraint ``` ## Supported Python Implementations ### CPython ```bash # Default implementation uv python install 3.11 uv python install [email protected] uv python install [email protected] ``` ### PyPy ```bash # Alternative Python implementation uv python install [email protected] uv python install [email protected] ``` ## Common Commands ```bash # Install and pin latest Python 3.12 uv python install 3.12 && uv python pin 3.12 # Install multiple versions for testing uv python install 3.10 3.11 3.12 # Check which Python is active uv python find uv run python --version # Uninstall version (manual) rm -rf ~/.local/share/uv/python/cpython-3.11.5-* ``` ## Integration with Projects ### Project Initialization ```bash # Initialize with specific Python uv init --python 3.11 my-project # Generates .python-version cat .python-version # 3.11 ``` ### Running Commands ```bash # Use project's pinned Python uv run python script.py # Override with specific version uv run --python 3.12 script.py # Use system Python uv run --python python3 script.py ``` ## Multi-Version Testing ```bash # Test across Python versions uv run --python 3.10 pytest uv run --python 3.11 pytest uv run --python 3.12 pytest # Create version-specific venvs 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 - Official docs: https://docs.astral.sh/uv/guides/install-python/ - Python standalone builds: https://github.com/indygreg/python-build-standalone - Detailed guide: See REFERENCE.md in this skill directory
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.