{
  "id": "python/pip-requires-python-version-mismatch",
  "signature": "ERROR: Package 'foo' requires a different Python: 3.9.18 not in '>=3.10'",
  "signature_zh": "ERROR: 包 'foo' 需要不同的 Python 版本：3.9.18 不在 '>=3.10' 范围内",
  "regex": "ERROR:\\ Package\\ 'foo'\\ requires\\ a\\ different\\ Python:\\ 3\\.9\\.18\\ not\\ in\\ '>=3\\.10'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The package's pyproject.toml declares requires-python with a minimum version greater than the running interpreter, so pip refuses to install it.",
  "root_cause_type": "generic",
  "root_cause_zh": "该包的 pyproject.toml 中声明的 requires-python 最低版本高于当前运行的 Python 解释器版本，因此 pip 拒绝安装。",
  "versions": [
    {
      "version": "3.8",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.9",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.10",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Bypasses the check but the package often uses syntax/APIs unavailable on the older interpreter, causing runtime failures.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Older releases may have unrelated bugs or missing security patches, and the user still needs the new features.",
      "fail_rate": 0.55,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "pyenv install 3.10.13 && pyenv local 3.10.13\npython -m venv .venv && source .venv/bin/activate\npip install foo",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.93,
      "how": "Use uv or conda to create an env with the required Python:\nuv venv --python 3.10 && uv pip install foo",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": null,
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.9,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-02",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}