{
  "id": "pip/error-installing-packages-in-editable-mode-with-pyproject-toml-and-no-setup-cfg",
  "signature": "ERROR: File 'setup.cfg' not found for legacy editable install of '<package>'",
  "signature_zh": "错误：找不到 'setup.cfg' 文件，无法进行 '<包名>' 的旧式可编辑安装",
  "regex": "ERROR: File 'setup\\.cfg' not found for legacy editable install of '[^']+'",
  "domain": "pip",
  "category": "build_error",
  "subcategory": null,
  "root_cause": "Pip is attempting a legacy editable install (pip install -e .) for a project that has a pyproject.toml but no setup.cfg, and the build backend doesn't support PEP 660 editable installs.",
  "root_cause_type": "generic",
  "root_cause_zh": "Pip 正在尝试对一个具有 pyproject.toml 但没有 setup.cfg 的项目进行旧式可编辑安装 (pip install -e .)，而构建后端不支持 PEP 660 可编辑安装。",
  "versions": [
    {
      "version": "pip 21.3-23.2",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Python 3.8-3.12",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "setuptools 64+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "flit-core 3.8+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Creating an empty setup.cfg file in the project root",
      "why_fails": "Pip requires a properly formatted setup.cfg with package metadata; an empty file does not satisfy the legacy editable install mechanism.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Downgrading pip to version 21.2 or earlier",
      "why_fails": "Older pip versions may not support pyproject.toml-based builds properly, leading to other errors.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using --no-use-pep517 flag",
      "why_fails": "This flag forces legacy setup.py install, which still requires setup.cfg for editable mode.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "pip install -e . --no-build-isolation",
      "success_rate": 0.75,
      "how": "pip install -e . --no-build-isolation",
      "condition": "",
      "sources": []
    },
    {
      "action": "pip install --editable . --config-settings editable_mode=strict",
      "success_rate": 0.8,
      "how": "pip install --editable . --config-settings editable_mode=strict",
      "condition": "",
      "sources": []
    },
    {
      "action": "pip install -e . --no-use-pep517 && pip install --no-deps --force-reinstall --no-build-isolation -e .",
      "success_rate": 0.85,
      "how": "pip install -e . --no-use-pep517 && pip install --no-deps --force-reinstall --no-build-isolation -e .",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "pip install -e . --no-build-isolation",
    "pip install --editable . --config-settings editable_mode=strict",
    "pip install -e . --no-use-pep517 && pip install --no-deps --force-reinstall --no-build-isolation -e ."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs",
  "official_doc_section": null,
  "error_code": "ERROR",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-08-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}