用独立安装器安装后可用 uv self update 自更新,用 pip 安装的则不行;uvx 是 uv tool run 的别名,运行工具时在临时环境中执行,不会装到全局
uv
astral-shApache-2.0活跃维护用 Rust 写的超快 Python 包与项目管理器,替代 pip、pip-tools、virtualenv 等工具,解决依赖解析慢和环境管理繁琐的问题。
An extremely fast Python package and project manager, written in Rust.
curl -LsSf https://astral.sh/uv/install.sh | sh
pip install uvREADME 未说明,仅说明支持 macOS、Linux 和 Windows
用 Rust 写的极快 Python 包与项目管理器,一个工具替代 pip、poetry、pyenv 等
用 Rust 写的超快 Python 包与项目管理器,替代 pip、pip-tools、virtualenv 等工具,解决依赖解析慢和环境管理繁琐的问题。
核心能力
- 单个工具替代 pip、pip-tools、pipx、poetry、pyenv、twine、virtualenv
- 比 pip 快 10-100 倍
- 提供带通用 lockfile 的完整项目管理
- 支持脚本内联依赖元数据并隔离运行
- 安装并管理 Python 版本与命令行工具
容易踩的坑
- 0.13.7最新正式版2026-11-03 · 2026-11-03 02:45 UTC
Release Notes
Released on 2026-11-03.
Preview features
- Add
--output-versiontouv workspace metadatafor requesting a specific schema version (#22958) - Report aliased OSV records as a single vulnerability in
uv audit(#22990)
Bug fixes
- Treat workspace member paths added by
uv initoruv addas literals instead of glob patterns (#23008) - Prevent uv's Windows trampolines from closing handles they did not inherit (#22977)
- Allow
uvxto run tools with CPython builds whose versions contain local identifiers (#23013) - Generate valid module names when
uv initcreates packaged projects whose names start with a digit (#23022) - Preserve comments around existing inline dependency groups when
uv addupdates a group (#23017) - Allow
uv removewith an empty inlinetool.uv.sourcestable (#23012)
Documentation
- Correct the
cache-keysinline table example (#22984)
Install uv 0.13.7
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.13.7/uv-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.13.7/uv-installer.ps1 | iex"Download uv 0.13.7
File Platform Checksum uv-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum uv-x86_64-apple-darwin.tar.gz Intel macOS checksum uv-aarch64-pc-windows-msvc.zip ARM64 Windows checksum uv-i686-pc-windows-msvc.zip x86 Windows checksum uv-x86_64-pc-windows-msvc.zip x64 Windows checksum uv-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum uv-i686-unknown-linux-gnu.tar.gz x86 Linux checksum uv-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum [uv-riscv64gc-unknown-linux-gnu.tar.gz](https://releases.astral.sh/git - Add
- 0.13.62026-10-27 · 2026-10-27 00:47 UTC
查看更新说明
Release Notes
Released on 2026-10-26.
Enhancements
- Accept an empty
UV_RUN_RECURSION_DEPTHas zero and report invalid values consistently (#22814) - Explain how to add project metadata when
uv initfinds apyproject.tomlwithout a[project]table (#22916)
Python
- Add CPython 3.11.18, 3.12.16, 3.13.18, 3.14.10, and 3.15.2 (#22938)
Preview features
- Detect NVIDIA GPU capabilities when selecting compatible wheel variants with
wheel-variants(#22690) - Nest each module's owners in an object in
uv workspace metadataoutput (#22638) - Report the unsupported properties required by an incompatible wheel variant (#22719)
Performance
- Reduce peak memory use when resolving large workspaces (#22860, #22863, #22864, #22866, #22870)
- Reduce peak memory use when locking or upgrading large projects (#22833, #22834)
- Speed up redirected output from
uv exportanduv pip compile(#22840) - Reuse cached or active environments when running PEP 723 scripts without dependencies (#21458)
- Reduce parsing overhead for build dependency and build backend settings (#22848, #22871, #22879, #22884)
- Reduce parsing overhead for project sources and workspace references (#22880, #22883)
- Reduce parsing overhead for cache, exclusion, cutoff, and preview settings (#22876, #22877, #22878, #22887)
- Reduce PyPI metadata parsing overhead (#22874, #22875)
- Speed up parsing tool receipt requirements (#22885)
Bug fixes
- Prevent
uv run --active --scriptanduv sync --active --scriptfrom deleting non-virtual-environment directories (#21464) - Use
AMD64forplatform_machinewhen resolving for x86-64 Windows (#22935) - Preserve free-threaded and other non-default variants in
uv python upgrade(#22836) - Allow
uv init --no-packageanduv init --scriptwhenUV_INIT_BUILD_BACKENDis set (#22907) - Prevent panics when rendering containment markers with local versions (#22815)
Documentation
- Update the Docker guide and reproduction examples to use uv 0.13.5 (#22867)
Install uv 0.13.6
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.13.6/uv-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.13.6/uv-installer.ps1 | iex"Do
- Accept an empty
- 0.13.52026-10-22 · 2026-10-22 01:35 UTC
查看更新说明
Release Notes
Released on 2026-10-21.
Following uv 0.13.4, which removed the affected eMudhra/emSign root from uv's own certificate store, this release updates the latest managed CPython builds for 3.11 and newer to python-build-standalone 20261021, including the CPython 3.15.1, 3.14.9, and 3.13.17 security patch releases. These builds include pip 26.2.2 both preinstalled in the managed interpreter and bundled with
ensurepip, which installs pip by default when you runpython -m venv. Both copies use certifi 2026.10.19, which removes the same affected root. After upgrading uv, runuv python upgradeto install the updated builds. Virtual environments pinned to an older Python patch version do not switch to the updated interpreter automatically. Upgrade pip separately in existing virtual environments.Please note upstream CPython 3.9 and 3.10 still bundle pip releases whose certificate bundles trust the affected eMudhra/emSign root. We recommend migrating off of those versions and will no longer be releasing Docker images with uv installed for EOL Python versions.
Enhancements
- Report incompatible self-dependencies directly in resolution errors (#21845)
Python
- Add CPython 3.15.1, 3.14.9, and 3.13.17 (#22802)
Preview features
- Select and rank wheel variants with no required properties or properties from PEP 850 static providers in platform-specific resolutions with
wheel-variants(#22535, #22536, #22687, #22688)
Performance
- Reduce peak memory use when resolving dependencies across multiple environments (#22769, #22770, #22784)
- Speed up exports with complex transitive extras by resolving activation across the dependency graph (#22751)
- Reduce uv's binary size by keeping additional error formatters out of line (#22775)
- Reduce overhead when parsing custom build cache keys (#22749)
Bug fixes
- Lock packages distributed only as Android wheels without a source distribution (#22806)
- Export optional dependencies correctly when transitive extras are activated through different or incompatible environment paths (#22751)
- Reject invalid custom build cache keys instead of silently falling back to the defaults (#22749)
Security
- Reject certificate chains containing compromised eMudhra intermediate keys via
rustls-webpki0.103.16 (#22777) - Stop publishing uv Docker images based on Python 3.9 and 3.10 images that no longer receive upstream updates (#22773)
Install uv 0.13.5
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.13.5/uv-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.13.5/uv-installer.ps1 | iex"Download uv 0.13.5
- 0.13.42026-10-20 · 2026-10-20 15:24 UTC
查看更新说明
Release Notes
Released on 2026-10-20.
This release addresses GHSA-hq85-5cpj-mr62, which involves a root CA whose intermediate on the Web PKI have been compromised. Users are encouraged to upgrade immediately, as well as confirm that all other software that uses bundled CAs is also properly updated.
Preview features
- Validate PEP 825 variant metadata and treat package versions with invalid metadata as unavailable under
wheel-variants(#22512)
Other changes
- Update the bundled Mozilla root certificates via
webpki-root-certs1.0.10 (#22760)
Install uv 0.13.4
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.13.4/uv-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.13.4/uv-installer.ps1 | iex"Download uv 0.13.4
File Platform Checksum uv-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum uv-x86_64-apple-darwin.tar.gz Intel macOS checksum uv-aarch64-pc-windows-msvc.zip ARM64 Windows checksum uv-i686-pc-windows-msvc.zip x86 Windows checksum uv-x86_64-pc-windows-msvc.zip x64 Windows checksum uv-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum uv-i686-unknown-linux-gnu.tar.gz x86 Linux checksum uv-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum uv-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum uv-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum [uv-x86_64-unknown-linux-gnu.tar.gz](https://releases.astral.sh/github/uv/ - Validate PEP 825 variant metadata and treat package versions with invalid metadata as unavailable under
- 0.13.32026-10-20 · 2026-10-20 01:15 UTC
查看更新说明
Release Notes
Released on 2026-10-20.
Performance
- Avoid severe
uv exportslowdowns in dependency graphs with extras (#22750)
Install uv 0.13.3
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/uv/releases/download/0.13.3/uv-installer.sh | shInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/uv/releases/download/0.13.3/uv-installer.ps1 | iex"Download uv 0.13.3
File Platform Checksum uv-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum uv-x86_64-apple-darwin.tar.gz Intel macOS checksum uv-aarch64-pc-windows-msvc.zip ARM64 Windows checksum uv-i686-pc-windows-msvc.zip x86 Windows checksum uv-x86_64-pc-windows-msvc.zip x64 Windows checksum uv-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum uv-i686-unknown-linux-gnu.tar.gz x86 Linux checksum uv-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum uv-riscv64gc-unknown-linux-gnu.tar.gz RISCV Linux checksum uv-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum uv-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum uv-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum [uv-aarch64-unknown-linux-musl.tar.gz](https://releases.astral.sh/github/uv/releases/download/0.13.3/uv-aarch6 - Avoid severe
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
uv
An extremely fast Python package and project manager, written in Rust.
Highlights
- A single tool to replace
pip,pip-tools,pipx,poetry,pyenv,twine,virtualenv, and more. - 10-100x faster than
pip. - Provides comprehensive project management, with a universal lockfile.
- Runs scripts, with support for inline dependency metadata.
- Installs and manages Python versions.
- Runs and installs tools published as Python packages.
- Includes a pip-compatible interface for a performance boost with a familiar CLI.
- Supports Cargo-style workspaces for scalable projects.
- Disk-space efficient, with a global cache for dependency deduplication.
- Installable without Rust or Python via
curlorpip. - Supports macOS, Linux, and Windows.
uv is backed by Astral, the creators of Ruff and ty.
Installation
Install uv with our standalone installers:
# On macOS and Linux.
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows.
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Or, from PyPI:
# With pip.
pip install uv
# Or pipx.
pipx install uv
If installed via the standalone installer, uv can update itself to the latest version:
uv self update
See the installation documentation for details and alternative installation methods.
Documentation
uv's documentation is available at docs.astral.sh/uv.
Additionally, the command line reference documentation can be viewed with uv help.
Features
Projects
uv manages project dependencies and environments, with support for lockfiles, workspaces, and more,
similar to rye or poetry:
$ uv init example
Initialized project `example` at `/home/user/example`
$ cd example
$ uv add ruff
Creating virtual environment at: .venv
Resolved 2 packages in 170ms
Built example @ file:///home/user/example
Prepared 2 packages in 627ms
Installed 2 packages in 1ms
+ example==0.1.0 (from file:///home/user/example)
+ ruff==0.5.0
$ uv run ruff check
All checks passed!
$ uv lock
Resolved 2 packages in 0.33ms
$ uv sync
Resolved 2 packages in 0.70ms
Checked 1 package in 0.02ms
See the project documentation to get started.
uv also supports building and publishing projects, even if they're not managed with uv. See the publish guide to learn more.
Scripts
uv manages dependencies and environments for single-file scripts.
Create a new script and add inline metadata declaring its dependencies:
$ echo 'import requests; print(requests.get("https://astral.sh"))' > example.py
$ uv add --script example.py requests
Updated `example.py`
Then, run the script in an isolated virtual environment:
$ uv run example.py
Reading inline script metadata from: example.py
Installed 5 packages in 12ms
<Response [200]>
See the scripts documentation to get started.
Tools
uv executes and installs command-line tools provided by Python packages, similar to pipx.
Run a tool in an ephemeral environment using uvx (an alias for uv tool run):
$ uvx pycowsay 'hello world!'
Resolved 1 package in 167ms
Installed 1 package in 9ms
+ pycowsay==0.0.0.2
"""
------------
< hello world! >
------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
Install a tool with uv tool install:
$ uv tool install ruff
Resolved 1 package in 6ms
Installed 1 package in 2ms
+ ruff==0.5.0
Installed 1 executable: ruff
$ ruff --version
ruff 0.5.0
See the tools documentation to get started.
Python versions
uv installs Python and allows quickly switching between versions.
Install multiple Python versions:
$ uv python install 3.12 3.13 3.14
Installed 3 versions in 972ms
+ cpython-3.12.12-macos-aarch64-none (python3.12)
+ cpython-3.13.9-macos-aarch64-none (python3.13)
+ cpython-3.14.0-macos-aarch64-none (python3.14)
Download Python versions as needed:
$ uv venv --python 3.12.0
Using Python 3.12.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
$ uv run --python [email protected] -- python --version
Python 3.8.16 (a9dbdca6fc3286b0addd2240f11d97d8e8de187a, Dec 29 2022, 11:45:30)
[PyPy 7.3.11 with GCC Apple LLVM 13.1.6 (clang-1316.0.21.2.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>>
Use a specific Python version in the current directory:
$ uv python pin 3.11
Pinned `.python-version` to `3.11`
See the Python installation documentation to get started.
The pip interface
uv provides a drop-in replacement for common pip, pip-tools, and virtualenv commands.
uv extends their interfaces with advanced features, such as dependency version overrides, platform-independent resolutions, reproducible resolutions, alternative resolution strategies, and more.
Migrate to uv without changing your existing workflows — and experience a 10-100x speedup — with the
uv pip interface.
Compile requirements into a platform-independent requirements file:
$ uv pip compile requirements.in \
--universal \
--output-file requirements.txt
Resolved 43 packages in 12ms
Create a virtual environment:
$ uv venv
Using Python 3.12.3
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
Install the locked requirements:
$ uv pip sync requirements.txt
Resolved 43 packages in 11ms
Installed 43 packages in 208ms
+ babel==2.15.0
+ black==24.4.2
+ certifi==2024.7.4
...
See the pip interface documentation to get started.
Contributing
We are passionate about supporting contributors of all levels of experience and would love to see you get involved in the project. See the contributing guide to get started.
FAQ
How do you pronounce uv?
It's pronounced as "you - vee" (/juː viː/)
How should I stylize uv?
Just "uv", please. See the style guide for details.
What platforms does uv support?
See uv's platform support document.
Is uv ready for production?
Yes, uv is stable and widely used in production. See uv's versioning policy document for details.
Acknowledgements
uv's dependency resolver uses PubGrub under the hood. We're grateful to the PubGrub maintainers, especially Jacob Finkelman, for their support.
uv's Git implementation is based on Cargo.
Some of uv's optimizations are inspired by the great work we've seen in pnpm, Orogene, and Bun. We've also learned a lot from Nathaniel J. Smith's Posy and adapted its trampoline for Windows support.
License
uv is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in uv by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.