Registry / testing / vermin

vermin

JSON →
library1.8.0pypypi✓ verified 86d ago

Vermin is a static analysis tool that concurrently detects the minimum Python versions required to run code. It is an actively maintained project with frequent updates, often adding support for the latest Python versions (e.g., 3.14, 3.13, 3.12) and expanding its rule set. It functions by parsing Python code into an abstract syntax tree (AST) and matching it against an extensive internal database of Python language features.

pip install vermin
INSTALL
IMPORT
SIG · VERMIN
V
vermin
testingpythonv1.8.0
Install
1.6s avg
Import
69ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.074s · 18.7MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.6s · import 0.064s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vermin
import vermin as V
The API is marked as experimental. Command-line interface is the primary and recommended usage.

Run Vermin from the command line on a specified Python file or directory to determine the minimum required Python versions.

# Analyze a Python file or directory vermin /path/to/your/project
vermin --version
Debug
Known issues
breakingVermin v1.6.0 removed support for running Vermin itself using Python 2.x interpreters. While Vermin can still *detect* Python 2.x features in your code, the tool itself must be executed with Python 3+.
fix
Ensure you are running the 'vermin' command with a Python 3.x interpreter (e.g., `python3 -m vermin` or if `vermin` is in your PATH and points to Python 3).
affects: >=1.6.0
gotchaDetection of Union types (`X | Y` as per PEP 604) became an opt-in feature in v1.5.2 due to potential inaccuracies. It's disabled by default.
fix
To enable union type detection, use the `--feature union-types` command-line argument. Be aware of potential incorrect results due to heuristic-based detection.
affects: >=1.5.2
breakingThe `--lax` mode was entirely removed in Vermin v1.4.0. This option was previously deprecated and is no longer available.
fix
Remove the `--lax` argument from your Vermin commands. Adjust your expectations or other configurations to accommodate the stricter default behavior.
affects: >=1.4.0
gotchaWhen using generic or literal annotations (e.g., `type X = SomeType` or `list[str]`), Vermin might suggest enabling annotation evaluation to get accurate results if annotations are disabled by default (e.g., due to `from __future__ import annotations`).
fix
If you suspect annotations are affecting results, try using `--eval-annotations`. However, consult the 'Caveats' section of the Vermin documentation, as this can sometimes yield incorrect results. `--no-eval-annotations` is on by default.
affects: >=1.4.2
Errors
Common errors & fixes
'vermin' is not recognized as an internal or external command, operable program or batch file.
The `vermin` executable is not in your system's PATH, or you're trying to run it in a Python REPL instead of a shell.
fix
Ensure `pip`'s binary directory is in your system's PATH, or invoke it directly via `python3 -m vermin <path>`. Always run `vermin` from your system's command line (shell), not inside a Python interpreter.
SyntaxError: invalid syntax (when trying to run `vermin /path/to/file.py` in Python REPL)
You are attempting to execute a shell command (`vermin`) directly within the Python interactive interpreter (REPL).
fix
Exit the Python REPL (e.g., by typing `exit()` or pressing Ctrl+D) and run the `vermin /path/to/file.py` command from your operating system's command line (bash, zsh, cmd, PowerShell, etc.).
Minimum required versions: X.Y, Z.W\nTarget versions not met: A.B, C.D\n(exit code 1)
This is Vermin's intended output when your code contains features requiring a Python version higher than one or more of your specified `--target` versions. The exit code `1` indicates that the target versions were violated.
fix
This is not an error but a diagnostic. Either update your code to be compatible with the `--target` versions, increase your `--target` versions to match the minimums detected by Vermin, or use `--exclude` to ignore specific findings. When using `vermin --violations`, only the problematic lines are shown.
Upgrade
Version history
1.8.0latest on PyPI · released Nov 20, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
14
Resources
vermin — pip install vermin · libregistry