# 使用 Homebrew, apk, chocolatey, dnf, MacPorts, Nix, pacman, scoop, winget, zypper 安装 uv

查看 uv 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:uv
```

## 代理安全回答

uv manages Python environments, dependencies, tools, and package publishing workflows.

- **凭据访问:** Reads Python index credentials, environment variables, and project configuration.
- **远程变更:** Can install packages, resolve remote indexes, and run project commands.
- **发布/制品风险:** Can build or publish Python packages when paired with packaging commands.
- **推荐控制:** Gate publishing and secret-backed index access; scan project env files first.
- **代理使用指南:** Allow lock/test operations; require approval for publish, credentialed index writes, and script execution using secrets.

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install uv
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install uv
```

  证据: MacPorts ports tree: devel/uv/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add uv
```

  证据: Alpine Linux edge package indexes: uv from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install uv
```

  证据: Fedora Rawhide package metadata: uv from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#uv
```

  证据: nixpkgs package indexes: pkgs/by-name/uv/uv/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S uv
```

  证据: Arch Linux sync databases: uv from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install python313-uv
```

  证据: openSUSE Tumbleweed package metadata: python313-uv from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install uv
```

  证据: Chocolatey community package catalog: uv from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','unikey'

- Scoop (92%):

```sh
scoop install main/uv
```

  证据: Scoop official bucket manifest trees: bucket/uv.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id astral-sh.uv -e
```

  证据: Windows Package Manager source index: astral-sh.uv from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:uv
- **软件包管理器:** Homebrew
- **版本:** 0.12.1
- **来源摘要:** Extremely fast Python package installer and resolver, written in Rust
- **主页:** <https://docs.astral.sh/uv/>
- **仓库:** <https://github.com/astral-sh/uv>
- **最后更新:** 2026-07-31T22:19:31Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- uv (别名)
- uvx (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.12.1
## 项目历史与用法

uv is Astral's Rust-written Python package and project manager. It began as a fast installer and resolver for pip and pip-tools workflows, then expanded into a unified interface for dependency resolution, virtual environments, project management, scripts, tools, and Python installation.

### 项目历史

Astral announced uv in February 2024 as the next tool in the same high-performance Python-tooling line as Ruff. The initial public framing was deliberately pragmatic: support common pip and pip-tools APIs under `uv pip`, provide a resolver, virtual environment creator, installer, sync command, and do so without requiring projects to rewrite their packaging workflow.

In August 2024 Astral announced a larger expansion of uv, describing it as moving beyond a pip alternative into an end-to-end solution for Python projects, command-line tools, single-file scripts, and Python itself. The official documentation later presented uv as a single tool replacing or overlapping pip, pip-tools, pipx, poetry, pyenv, twine, virtualenv, and related pieces of the Python packaging stack.

### 采用历史

uv's adoption path was shaped by compatibility and speed rather than by a new packaging format alone. Astral emphasized that the first release was production-ready for existing pip and pip-tools workflows and required little configuration for those users.

Package-manager adoption followed the same low-friction pattern. The official installation documentation lists standalone installers, PyPI installation, Homebrew, MacPorts, WinGet, Scoop, Docker images, and other distribution routes, making uv easy to place in developer laptops, CI images, and reproducible build environments.

### 使用方式

For package-nerd workflows, uv is commonly used as a faster `pip install`, `pip compile`, `pip sync`, `venv`, and `pipx`-style tool runner. In project mode, it centers dependency state around `pyproject.toml` and `uv.lock`, while retaining a `uv pip` interface for requirements-file and environment-oriented workflows.

The official docs call out a global cache, Cargo-style workspaces, cross-platform installation, and integrations for Docker, GitHub Actions, GitLab CI/CD, pre-commit, PyTorch, FastAPI, Bazel, and several private package registries. Those are the surfaces that made uv especially interesting to people who care about resolver behavior, lockfiles, build reproducibility, and CI runtime.

### 为什么软件包爱好者会关心

uv matters in package-manager culture because it compressed several long-standing Python packaging pain points into one fast executable: resolution, installation, environment creation, lockfile generation, tool execution, and Python runtime management. Its significance is not just that it is fast, but that it made speed available through familiar pip-shaped entry points before asking users to adopt its fuller project model.

It also accelerated the Rust-based rewrite trend in Python infrastructure. Like Ruff for linting and formatting, uv made performance a central product argument and forced comparisons with older Python-native tools such as pip-tools, Poetry, PDM, pipx, and virtualenv.

### 时间线

- 2024-02: Astral announced uv as a fast Python package installer and resolver written in Rust.
- 2024-08: Astral announced uv's expansion into unified Python packaging, including projects, tools, scripts, and Python installation.
- 2024-2026: Official docs list uv across standalone installers, PyPI, Homebrew, MacPorts, WinGet, Scoop, Docker, and CI integrations.

### Related projects

- Ruff is Astral's earlier Rust-written Python linter and formatter and is the closest sibling in toolchain philosophy.
- pip, pip-tools, pipx, Poetry, PDM, pyenv, twine, and virtualenv are the tools uv explicitly overlaps with or replaces in common Python packaging workflows.

### 来源

- <https://astral.sh/blog/uv - Astral's February 2024 uv announcement describes the initial pip and pip-tools replacement goal, Rust implementation, resolver/installer focus, and production-use framing.>
- <https://astral.sh/blog/uv-unified-python-packaging - Astral's August 2024 announcement describes the expansion from pip alternative to unified Python packaging.>
- <https://docs.astral.sh/uv/ - Official uv documentation summarizes the tool, supported platforms, cache, workspaces, and installation routes.>
- <https://docs.astral.sh/uv/getting-started/installation/ - Official installation docs list package-manager and installer distribution routes.>
- <https://docs.astral.sh/uv/pip/ - Official docs describe the `uv pip` interface as a drop-in surface for pip, pip-tools, and virtualenv workflows.>


## 安全说明

没有找到 uv 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。

- **审批门规则:** 6


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Credential files

- Unix: ~/.local/share/uv/credentials/credentials.toml
## 其他软件包管理器记录

- Nix - uv: normalized package name match | nixpkgs package indexes: pkgs/by-name/uv/uv/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - py3-uv - 0.12.0-r0: normalized package name match | Alpine Linux edge package indexes: py3-uv from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Extremely fast Python package installer and resolver, written in Rust (python module) | https://github.com/astral-sh/uv
- apk - py3-uv-pyc - 0.12.0-r0: normalized package name match | Alpine Linux edge package indexes: py3-uv-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for py3-uv | https://github.com/astral-sh/uv
- apk - uv - 0.12.0-r0: normalized package name match | Alpine Linux edge package indexes: uv from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Extremely fast Python package installer and resolver, written in Rust | https://github.com/astral-sh/uv
- apk - uv-bash-completion - 0.12.0-r0: normalized package name match | Alpine Linux edge package indexes: uv-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for uv | https://github.com/astral-sh/uv
- apk - uv-fish-completion - 0.12.0-r0: normalized package name match | Alpine Linux edge package indexes: uv-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for uv | https://github.com/astral-sh/uv
- apk - uv-zsh-completion - 0.12.0-r0: normalized package name match | Alpine Linux edge package indexes: uv-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for uv | https://github.com/astral-sh/uv
- dnf - python3-uv - 0.12.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: python3-uv from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Importable Python module for uv | https://github.com/astral-sh/uv
- dnf - uv - 0.12.1-1.fc45: normalized package name match | Fedora Rawhide package metadata: uv from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | An extremely fast Python package installer and resolver, written in Rust | https://github.com/astral-sh/uv
- pacman - uv - 0.12.1-1: normalized package name match | Arch Linux sync databases: uv from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | An extremely fast Python package installer and resolver written in Rust | https://github.com/astral-sh/uv
- zypper - python313-uv - 0.12.1-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python313-uv from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Python package installer and resolver, written in Rust | https://github.com/astral-sh/uv
- zypper - python314-uv - 0.12.1-1.1: normalized package name match | openSUSE Tumbleweed package metadata: python314-uv from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Python package installer and resolver, written in Rust | https://github.com/astral-sh/uv
- MacPorts - uv: normalized package name match | MacPorts ports tree: devel/uv/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - uv: normalized package name match | Chocolatey community package catalog: uv from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','unikey'
- Scoop - main/uv: normalized package name match | Scoop official bucket manifest trees: bucket/uv.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - astral-sh.uv: normalized package name match | Windows Package Manager source index: astral-sh.uv from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/uv.yml](https://github.com/mxcl/pkgdb/blob/main/combined/uv.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- approval-gate seed metadata
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
- curated agent safety answer
