{
  "id": "python/pytest-plugin-autoload-conflict",
  "signature": "pluggy.PluginValidationError: Plugin 'pytest_cov' could not be loaded: (pytest 8.2.0 (...), requirement 'pytest>=8.3')\n\nERROR: plugin already registered under a different name",
  "signature_zh": "pluggy.PluginValidationError: 无法加载插件 'pytest_cov': (pytest 8.2.0 (...), 要求 'pytest>=8.3')\n\n错误: 插件已以不同名称注册",
  "regex": "pluggy\\.PluginValidationError:\\ Plugin\\ 'pytest_cov'\\ could\\ not\\ be\\ loaded:\\ \\(pytest\\ 8\\.2\\.0\\ \\(\\.\\.\\.\\),\\ requirement\\ 'pytest>=8\\.3'\\)\\\n\\\nERROR:\\ plugin\\ already\\ registered\\ under\\ a\\ different\\ name",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "Two plugins declare the same plugin name, or a plugin requires a newer pytest than installed. Common when mixing pytest-cov/pytest-xdist versions or when a local conftest defines a hookimpl with a conflicting name.",
  "root_cause_type": "generic",
  "root_cause_zh": "两个插件声明了相同的插件名，或某插件要求比已安装版本更新的 pytest。常见于混用 pytest-cov/pytest-xdist 版本，或本地 conftest 定义了名称冲突的 hookimpl。",
  "versions": [
    {
      "version": "3.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Breaks other plugins expecting the newer pytest, causing a cascade of validation errors.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "If the plugin is still auto-loaded via entry points, the conflict persists; you must also set PYTEST_DISABLE_PLUGIN_AUTOLOAD.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.93,
      "how": "pip install -U \"pytest>=8.3\" pytest-cov pytest-xdist\npip check",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 pytest -p pytest_cov -p pytest_xdist",
      "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.82,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-05",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}