---
source: https://iinventedlight.com/library/notes/mypy-type-checker.md
title: "mypy type-checks Python statically and can be adopted incrementally"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "MIT (mypy docs); MIT (python/mypy (GitHub)); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: mypy docs, Getting started, MIT (https://raw.githubusercontent.com/python/mypy/master/LICENSE); python/mypy (GitHub), Getting started (mypy source docs), MIT (https://raw.githubusercontent.com/python/mypy/master/LICENSE)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-16
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-16
as_of: 2026-11-16
confidence: medium
untested: "Not reproduced (2026-11-16). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-python: mypy type checker"
tags: [mypy, typing, type-checker, python]
client: Librarian
sources:
  - id: S1
    title: "Getting started"
    publisher: mypy docs
    url: https://mypy.readthedocs.io/en/stable/getting_started.html
    accessed: 2026-11-16
    license: "MIT"
  - id: S2
    title: "Getting started (mypy source docs)"
    publisher: python/mypy (GitHub)
    url: https://github.com/python/mypy/blob/master/docs/source/getting_started.rst
    accessed: 2026-11-16
    license: "MIT"
---
# mypy type-checks Python statically and can be adopted incrementally
**Answer:** You can install mypy using pip: `python3 -m pip install mypy`. Mypy requires Python 3.10 or later to run. After the install, run `mypy program.py`.

That command type-checks `program.py` and prints errors it finds. Mypy will type check your code statically. It checks for errors without ever running your code, just like a linter. You can still run the file with the Python interpreter if mypy reports errors.

The getting-started chapter introduces some core concepts of mypy, including function annotations, the typing module, and stub files. Existing unannotated code will most likely report little to no errors. That behavior is a feature, because it makes it easy to adopt mypy incrementally.

## See also

- [python-typing-annotations](https://iinventedlight.com/library/notes/python-typing-annotations/)
- [python-venv](https://iinventedlight.com/library/notes/python-venv/)
- [python-typeddict](https://iinventedlight.com/library/notes/python-typeddict/)
- [python-typing-protocol](https://iinventedlight.com/library/notes/python-typing-protocol/)

## Claims

- id: C1
  claim: Mypy requires Python 3.10 or later to run.
  source: S1
  evidence: "Mypy requires Python 3.10 or later to run."

- id: C2
  claim: You can install mypy using pip.
  source: S2
  evidence: "You can install mypy using pip:"

- id: C3
  claim: mypy type-checks a file without running the code.
  source: S2
  evidence: "it will check for errors without ever running your code, just"

- id: C4
  claim: The getting-started chapter introduces function annotations and typing.
  source: S2
  evidence: "including function"

## Sources

- [S1] Getting started. mypy docs. https://mypy.readthedocs.io/en/stable/getting_started.html . License: MIT. Accessed 2026-11-16.

- [S2] Getting started (mypy source docs). python/mypy (GitHub). https://github.com/python/mypy/blob/master/docs/source/getting_started.rst . License: MIT. Accessed 2026-11-16.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: mypy docs, Getting started, MIT (https://raw.githubusercontent.com/python/mypy/master/LICENSE); python/mypy (GitHub), Getting started (mypy source docs), MIT (https://raw.githubusercontent.com/python/mypy/master/LICENSE). Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
