{
  "id": "python/pytest-missing-plugin",
  "signature": "pytest.PytestConfigError: Unknown plugin: 'pytest-cov'",
  "signature_zh": "pytest 配置错误：未知插件：'pytest-cov'",
  "regex": "pytest\\.PytestConfigError:\\ Unknown\\ plugin:\\ 'pytest\\-cov'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The pytest configuration (pytest.ini, pyproject.toml, or conftest.py) references a plugin that is not installed in the current Python environment, causing pytest to fail on startup.",
  "root_cause_type": "generic",
  "root_cause_zh": "pytest 配置文件（pytest.ini、pyproject.toml 或 conftest.py）引用了当前 Python 环境中未安装的插件，导致 pytest 启动失败。",
  "versions": [
    {
      "version": "3.11",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Adding the plugin name to conftest.py's pytest_plugins list without installing it first still raises the same error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Ignoring the error and running tests with -p no:plugin may suppress the error but disables the plugin's functionality.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Install the missing plugin using pip: pip install pytest-cov, then re-run pytest.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "If the plugin is not needed, remove its reference from the configuration file (e.g., delete 'pytest-cov' from addopts or plugins list).",
      "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.87,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-07-10",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}