{
  "id": "python/pip-install-editable-failed-no-setup-py",
  "signature": "ERROR: File \"setup.py\" not found. Cannot install editable mode.",
  "signature_zh": "错误：未找到文件 \"setup.py\"。无法安装可编辑模式。",
  "regex": "ERROR:\\ File\\ \"setup\\.py\"\\ not\\ found\\.\\ Cannot\\ install\\ editable\\ mode\\.",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The package directory does not contain a setup.py, and pip's editable install requires it (unless using PEP 660 with pyproject.toml).",
  "root_cause_type": "generic",
  "root_cause_zh": "包目录不包含 setup.py，而 pip 的可编辑安装需要它（除非使用带有 pyproject.toml 的 PEP 660）。",
  "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"
    },
    {
      "version": "3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "May not provide correct metadata; installation may fail or be incomplete.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Does not create setup.py.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.9,
      "how": "Ensure the package has a pyproject.toml with build-system and use `pip install -e .` with pip>=21.3.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.85,
      "how": "If the project uses setup.cfg, add a minimal setup.py: `from setuptools import setup; setup()`.",
      "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-05-28",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}