Overview
uv can detect and use existing Python installations, but it can also install and manage Python versions for you. Python is automatically downloaded when needed — you don’t need to install it first.python-build-standalone project. See Python distributions for details.Getting started
Install the latest Python
Use the installed Python
python3.13).Install default executables (experimental)
python and python3 executables:Installing specific versions
Install any Python version you need:python install documentation for all options.
Viewing Python installations
List available and installed Python versions:- Installed versions (uv-managed and system)
- Available versions for download
- Version details (implementation, architecture)
python list for more details.
Automatic Python downloads
Python is downloaded automatically when needed:Using existing Python versions
uv automatically discovers and uses system Python installations. No configuration needed!Force system Python
Prevent uv from using managed Python versions:Pinning Python versions
In projects
The.python-version file pins the Python version for a project:
With pyenv compatibility
uv respects.python-version files created by pyenv:
Upgrading Python versions
Upgrade to the latest supported patch release:python upgrade documentation.
Reinstalling Python
Reinstall uv-managed Python versions:- Fixing corrupted installations
- Getting improvements to Python distributions
- Resolving platform-specific issues
Switching Python versions
In projects
Check current version
Change version
Recreate environment
For specific commands
Use--python to override the Python version:
Working with multiple Python versions
Install all versions you need
Test across versions
Build with specific versions
Complete workflow examples
Setting up a new project
Install Python
Create project
Verify Python version
Start developing
Migrating to a newer Python version
Install new Python
Update project
Update pyproject.toml
Recreate environment
Test everything
Working with PyPy
Install PyPy
Create PyPy environment
Use PyPy
Best practices
Pin Python versions in projects
Pin Python versions in projects
.python-version file in your project:Specify requires-python in pyproject.toml
Specify requires-python in pyproject.toml
Keep Python versions updated
Keep Python versions updated
Test across Python versions
Test across Python versions
Troubleshooting
Python version not found
Python version not found
Wrong Python version used
Wrong Python version used
--python:Automatic downloads not working
Automatic downloads not working
Environment issues after Python upgrade
Environment issues after Python upgrade