# 使用 Homebrew, apt, Nix, pacman, zypper 安装 mypy

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

## 安装

```sh
sudo av install brew:mypy
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mypy
```

  证据: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install mypy
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#mypy
```

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

- pacman (92%):

```sh
sudo pacman -S mypy
```

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

- zypper (92%):

```sh
sudo zypper install python313-mypy
```

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

## 软件包事实

- **软件包键:** brew:mypy
- **软件包管理器:** Homebrew
- **版本:** 2.3.0
- **来源摘要:** Experimental optional static type checker for Python
- **主页:** <https://www.mypy-lang.org/>
- **仓库:** <https://github.com/python/mypy>
- **最后更新:** 2026-07-14T12:42:18Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dmypy (别名)
- mypy (别名)
- mypyc (别名)
- stubgen (别名)
- stubtest (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

mypy is an optional static type checker for Python. Jukka Lehtosalo began work on it in 2012 while at the University of Cambridge Computer Laboratory as a PhD student, borrowing ideas from his earlier Alore language and from gradual typing research. The project grew from an experiment in adding an optional static type system to Python-like code into the best-known standalone checker for ordinary Python programs.

### 项目历史

The technical turning point was the standardization of Python type hints. PEP 484 defines the syntax and goals for type annotations in Python, explicitly naming offline type checkers such as mypy as a primary use case while keeping Python dynamically typed and type hints optional. The mypy blog described the first PEP 484 draft as heavily inspired by mypy, and later mypy versions implemented the PEP 484 annotation model used in Python codebases, editors, and CI systems.

### 使用方式

Dropbox became a major adoption story and development home for mypy. A Dropbox engineering writeup describes its gradual migration to static checking across millions of lines of Python, calling mypy likely the most popular standalone Python type checker and noting that the core team was employed by Dropbox. In day-to-day use, developers add annotations in source files or stubs, run the `mypy` command to find type errors without executing the program, use `dmypy` for daemonized checks, and use helpers such as `stubgen`, `stubtest`, and `mypyc` for typing ecosystem work. Package managers ship it as a developer tool for Python projects that want static analysis without changing Python's runtime model.

### 来源

- <https://dropbox.tech/application/our-journey-to-type-checking-4-million-lines-of-python>
- <https://formulae.brew.sh/formula/mypy>
- <https://github.com/python/mypy>
- <https://mypy-lang.blogspot.com/2015/01/mypy-and-pep-484-type-hinting-draft.html>
- <https://mypy-lang.org/>
- <https://mypy-lang.org/about.html>
- <https://mypy.readthedocs.io/>
- <https://peps.python.org/pep-0484/>


## 安全说明

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



## 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.


## Configuration files

- Unix: mypy.ini, .mypy.ini, pyproject.toml, setup.cfg, $XDG_CONFIG_HOME/mypy/config, ~/.config/mypy/config, ~/.mypy.ini
## 其他软件包管理器记录

- Debian apt - mypy - 1.15.0-5: normalized package name match | Debian stable package indexes: mypy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | optional static typing for Python | https://www.mypy-lang.org/
- Debian apt - mypy-doc - 1.15.0-5: normalized package name match | Debian stable package indexes: mypy-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | documentation for mypy | https://www.mypy-lang.org/
- Debian apt - python3-mypy - 1.15.0-5: normalized package name match | Debian stable package indexes: python3-mypy from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | public modules for mypy (Python 3) | https://www.mypy-lang.org/
- Nix - mypy: normalized package name match | nixpkgs package indexes: mypy from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - mypy - 1.9.0-4ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: mypy from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | optional static typing for Python | https://www.mypy-lang.org/
- Ubuntu apt - mypy-doc - 1.9.0-4ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: mypy-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | documentation for mypy | https://www.mypy-lang.org/
- Ubuntu apt - python3-mypy - 1.9.0-4ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-mypy from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | public modules for mypy (Python 3) | https://www.mypy-lang.org/
- pacman - mypy - 2.1.0-2: normalized package name match | Arch Linux sync databases: mypy from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Optional static typing for Python (PEP484) | http://www.mypy-lang.org/
- zypper - python313-mypy - 2.2.0-2.1: normalized package name match | openSUSE Tumbleweed package metadata: python313-mypy from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Optional static typing for Python | https://www.mypy-lang.org/


## Combined YAML source

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


## 来源

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