Registry / devops / uv
library0.12.6pypypi✓ verified 26d ago

Extremely fast Python package and project manager written in Rust by Astral. Current version is 0.11.2 (Mar 2026). Replaces pip, pip-tools, pipx, poetry, pyenv, virtualenv, and twine in a single tool. Recommended install is the standalone installer or pipx — NOT pip install uv into a project venv. uv is a CLI tool, not a Python library to import.

curl -LsSf https://astral.sh/uv/install.sh | sh
INSTALL
IMPORT
SIG · UV
U
uv
devopspythonv0.12.6
Install
2.6s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.12.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

uv (CLI)
# uv is a CLI tool — not a Python library to import # Key commands: # Project management uv init myproject # create new project uv add requests # add dependency uv remove requests # remove dependency uv sync # install all deps from lockfile uv run python script.py # run in project venv uv run pytest # run tool in project venv # Python management uv python install 3.12 # download and install Python uv python pin 3.12 # pin version for current dir # pip compatibility mode uv pip install requests # fast pip replacement uv pip install -r requirements.txt # Tool runner (like pipx) uvx ruff check . # run ruff in ephemeral env uvx black . # run black without installing
# uv is NOT a Python library: import uv # ModuleNotFoundError from uv import install # ModuleNotFoundError
uv is a command-line tool only — there is no Python API to import. It manages packages, venvs, Python versions, and scripts from the terminal.

uv init creates pyproject.toml. uv add writes deps + lockfile. uv run uses the project venv.

# Install uv (standalone installer) curl -LsSf https://astral.sh/uv/install.sh | sh # Create a new project uv init myapp cd myapp # Add dependencies (writes to pyproject.toml + uv.lock) uv add fastapi uvicorn pydantic uv add --dev pytest ruff black # Run the project uv run uvicorn main:app --reload # Run tests uv run pytest # Sync environment from lockfile (like pip install -r) uv sync # Install a specific Python version uv python install 3.12 uv python pin 3.12 # pins .python-version # pip compatibility (drop-in for pip) uv pip install requests uv pip install -r requirements.txt uv pip compile requirements.in # like pip-tools # Run tools without installing (like pipx run) uvx ruff check . uvx black .
uv --version
Debug
Known issues
gotchapip install uv into a project venv is not recommended. uv is a system-level tool — installing it as a project dependency is unnecessary and can cause version conflicts. Use the standalone installer or pipx.
fix
Install globally by running "curl -LsSf https://astral.sh/uv/install.sh | sh" directly in your shell, or use "pipx install uv". If executing this from a Python script, use the subprocess module (e.g., subprocess.run(["sh", "-c", "curl -LsSf https://astral.sh/uv/install.sh | sh"])) to run shell commands. Only use pip install uv in CI/Docker where you need a quick install without curl.
affects: all
gotchauv pip install and uv add are different commands. uv pip install is a pip drop-in — it installs into the current environment without writing to pyproject.toml or lockfile. uv add is the project-aware command that updates pyproject.toml and uv.lock.
fix
For project dependencies: use uv add requests. For quick pip-compatible installs: use uv pip install requests. Never mix them in the same workflow.
affects: all
gotchauv run automatically creates a virtual environment in .venv if one doesn't exist. Running uv run before uv sync in CI can produce an environment with only default dependencies, missing project extras.
fix
In CI: run uv sync first, then uv run. Or use uv run --frozen to prevent environment creation if the lockfile is not satisfied.
affects: all
breakingTLS certificate verification changed in 0.11.1: rustls-platform-verifier replaced rustls-native-certs for certificate validation. May reject certificates previously trusted, especially on systems with custom CA certificates.
fix
If you see TLS certificate errors after upgrading, use UV_NATIVE_TLS=1 environment variable or --native-tls flag to fall back to system TLS.
affects: >= 0.11.1
gotchauvx is an alias for uv tool run — it runs tools in ephemeral, isolated environments. Tools installed with uv tool install persist. uvx installs and runs in a throwaway env each time.
fix
For one-off use: uvx ruff check . For permanent install: uv tool install ruff then ruff check .
affects: all
gotchauv generates uv.lock (not requirements.txt or poetry.lock). The lockfile is universal — it contains dependencies for all platforms. Committing uv.lock to version control is required for reproducible builds.
fix
Always commit uv.lock. In CI, use uv sync --frozen to install exactly what's in the lockfile without updating it.
affects: all
Upgrade
Version history
0.12.6latest on PyPI · released Aug 25, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources