{
  "id": "pip/editable-install-no-setup-cfg",
  "signature": "ERROR: File 'setup.cfg' not found for legacy editable install of '<package>'. A setup.cfg or pyproject.toml is required for editable installs.",
  "signature_zh": "错误：对于 '<package>' 的传统可编辑安装，未找到 'setup.cfg' 文件。可编辑安装需要 setup.cfg 或 pyproject.toml。",
  "regex": "ERROR: File 'setup\\.cfg' not found for legacy editable install of '[^']+'\\. A setup\\.cfg or pyproject\\.toml is required for editable installs\\.",
  "domain": "pip",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "Pip's legacy editable install mode (using setup.py develop) requires a setup.cfg file with metadata, but it is missing from the project directory.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 的传统可编辑安装模式（使用 setup.py develop）需要包含元数据的 setup.cfg 文件，但项目目录中缺少该文件。",
  "versions": [
    {
      "version": "pip 23.1",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "pip 24.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "setuptools 68.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Still uses legacy editable mode; missing setup.cfg causes the same error.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "An empty setup.cfg lacks required metadata fields (name, version), causing a different error later.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This changes the source but still requires the target project to have proper structure; often fails with same error.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add a setup.cfg file with minimum metadata:\n[metadata]\nname = <package>\nversion = 0.1.0\n[options]\npackages = find:",
      "success_rate": 0.9,
      "how": "Add a setup.cfg file with minimum metadata:\n[metadata]\nname = <package>\nversion = 0.1.0\n[options]\npackages = find:",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use modern editable install: pip install -e . --config-settings editable_mode=compat",
      "success_rate": 0.85,
      "how": "Use modern editable install: pip install -e . --config-settings editable_mode=compat",
      "condition": "",
      "sources": []
    },
    {
      "action": "Upgrade to pip 21.3+ and use pyproject.toml with setuptools backend:\n[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"",
      "success_rate": 0.95,
      "how": "Upgrade to pip 21.3+ and use pyproject.toml with setuptools backend:\n[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Add a setup.cfg file with minimum metadata:\n[metadata]\nname = <package>\nversion = 0.1.0\n[options]\npackages = find:",
    "Use modern editable install: pip install -e . --config-settings editable_mode=compat",
    "Upgrade to pip 21.3+ and use pyproject.toml with setuptools backend:\n[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\""
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://setuptools.pypa.io/en/latest/userguide/declarative_config.html",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-08-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}