# 使用 Homebrew, apt, MacPorts, Nix, pacman 安装 pyupgrade

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

## 安装

```sh
sudo av install brew:pyupgrade
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install pyupgrade
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install pyupgrade
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install pyupgrade
```

  证据: Debian stable package indexes: pyupgrade from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#pyupgrade
```

  证据: nixpkgs package indexes: pyupgrade from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S pyupgrade
```

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

## 软件包事实

- **软件包键:** brew:pyupgrade
- **软件包管理器:** Homebrew
- **版本:** 3.21.2
- **来源摘要:** Upgrade syntax for newer versions of Python
- **主页:** <https://github.com/asottile/pyupgrade>
- **仓库:** <https://github.com/asottile/pyupgrade>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- pyupgrade (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.21.2

## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- Debian apt - pyupgrade - 3.19.1-1: normalized package name match | Debian stable package indexes: pyupgrade from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tool to automatically upgrade Python 3 syntax for newer versions | https://github.com/asottile/pyupgrade
- Nix - pyupgrade: normalized package name match | nixpkgs package indexes: pyupgrade from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - pyupgrade - 2.37.1-2: normalized package name match | Ubuntu 24.04 LTS package indexes: pyupgrade from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Tool to automatically upgrade Python 3 syntax for newer versions | https://github.com/asottile/pyupgrade
- pacman - pyupgrade - 3.21.2-1: normalized package name match | Arch Linux sync databases: pyupgrade from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A tool to automatically upgrade syntax for newer versions of the language | https://github.com/asottile/pyupgrade
- MacPorts - pyupgrade: normalized package name match | MacPorts ports tree: python/pyupgrade/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
