python-compat

A compatibility check for your Python version and installed AI libraries, including PyTorch, TensorFlow, JAX, NumPy, and SciPy.

In plain words
What is it for?
Checking whether your Python version is supported and returning the results for people or programs in readable or JSON format.
Why use it?
It identifies version conflicts and dependency cascades, where one package's requirements restrict other packages.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mitulgarg/env-doctor/python-compat
Clone the repo
git clone --depth 1 https://github.com/mitulgarg/env-doctor
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,709 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01709
Opus 5 $0.00000 $0.00855
Sonnet 5 $0.00000 $0.00342
Haiku 4.5 $0.00000 $0.00171

Measured 2d ago against content hash b9dadf6b98e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

python-compat scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/python-compat.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

python-compat

Check Python version compatibility with installed AI libraries and detect dependency cascades.

Usage

env-doctor python-compat [--json]

Description

The python-compat command checks if your current Python version is compatible with installed AI libraries like PyTorch, TensorFlow, JAX, NumPy, SciPy, and others. It identifies:

  • Version conflicts: When your Python version is outside a library's supported range
  • Dependency cascades: When one library's constraint forces version limits on downstream packages

Options

Option Description
--json Output results in JSON format for programmatic consumption

Output

Human-readable format (default)

🐍  PYTHON VERSION COMPATIBILITY CHECK
============================================================
Python Version: 3.13 (3.13.0)
Libraries Checked: 2

❌  2 compatibility issue(s) found:

    tensorflow:
      tensorflow supports Python <=3.12, but you have Python 3.13
      Note: TensorFlow 2.15+ requires Python 3.9-3.12. Python 3.13 not yet supported.

    torch:
      torch supports Python <=3.12, but you have Python 3.13
      Note: PyTorch 2.x supports Python 3.9-3.12. Python 3.13 support experimental.

⚠️   Dependency Cascades:
    tensorflow [high]: TensorFlow's Python ceiling propagates to keras and tensorboard
      Affected: keras, tensorboard, tensorflow-estimator
    torch [high]: PyTorch's Python version constraint affects all torch ecosystem packages
      Affected: torchvision, torchaudio, triton

💡  Consider using Python 3.12 or lower for full compatibility

💡  Cascade: tensorflow constraint also affects: keras, tensorboard, tensorflow-estimator

💡  Cascade: torch constraint also affects: torchvision, torchaudio, triton

============================================================

JSON format (--json)

{
  "component": "python_compat",
  "status": "error",
  "detected": false,
  "version": "3.13",
  "path": null,
  "metadata": {
    "python_full_version": "3.13.0",
    "conflicts": [
      {
        "library": "tensorflow",
        "min_version": "3.9",
        "max_version": "3.12",
        "notes": "TensorFlow 2.15+ requires Python 3.9-3.12. Python 3.13 not yet supported.",
        "type": "above_maximum",
        "message": "tensorflow supports Python <=3.12, but you have Python 3.13"
      },
      {
        "library": "torch",
        "min_version": "3.9",
        "max_version": "3.12",
        "notes": "PyTorch 2.x supports Python 3.9-3.12. Python 3.13 support experimental.",
        "type": "above_maximum",
        "message": "torch supports Python <=3.12, but you have Python 3.13"
      }
    ],
    "cascades": [
      {
        "root_library": "tensorflow",
        "affected_dependencies": ["keras", "tensorboard", "tensorflow-estimator"],
        "severity": "high",
        "description": "TensorFlow's Python ceiling propagates to keras and tensorboard"
      },
      {
        "root_library": "torch",
        "affected_dependencies": ["torchvision", "torchaudio", "triton"],
        "severity": "high",
        "description": "PyTorch's Python version constraint affects all torch ecosystem packages"
      }
    ],
    "constraints_checked": 2
  },
  "issues": [
    "tensorflow supports Python <=3.12, but you have Python 3.13",
    "torch supports Python <=3.12, but you have Python 3.13"
  ],
  "recommendations": [
    "Consider using Python 3.12 or lower for full compatibility",
    "Cascade: tensorflow constraint also affects: keras, tensorboard, tensorflow-estimator",
    "Cascade: torch constraint also affects: torchvision, torchaudio, triton"
  ]
}

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 240 lines · 0 tokens per session scan A b9dadf6b98e0

Subscribe to this mod's changes

python-compat is a command published in the GitHub repository mitulgarg/env-doctor (172 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,709 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.