{
  "id": "python/pip-fallback-to-legacy-setup-py",
  "signature": "ERROR: Backend subprocess exited when trying to invoke 'setup.py'.",
  "signature_zh": "错误：尝试调用 'setup.py' 时后端子进程退出。",
  "regex": "ERROR:\\ Backend\\ subprocess\\ exited\\ when\\ trying\\ to\\ invoke\\ 'setup\\.py'\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "pip defaults to PEP 517 build isolation but the project's pyproject.toml missing build-system table, causing fallback to legacy setup.py which fails due to missing dependencies.",
  "root_cause_type": "generic",
  "root_cause_zh": "pip 默认使用 PEP 517 构建隔离，但项目的 pyproject.toml 缺少 build-system 表，导致回退到旧的 setup.py 方式，因依赖缺失而失败。",
  "versions": [
    {
      "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": "Reinstalling setuptools globally with pip install --upgrade setuptools",
      "why_fails": "Global upgrade doesn't fix the build-time dependency issue caused by PEP 517 isolation.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Deleting pyproject.toml entirely",
      "why_fails": "Removing the file doesn't help; pip will still try to use legacy setup.py without proper environment.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add build-system table to pyproject.toml",
      "success_rate": 0.95,
      "how": "Add to pyproject.toml:\n[build-system]\nrequires = [\"setuptools\", \"wheel\"]\nbuild-backend = \"setuptools.build_meta\"",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use --no-build-isolation flag",
      "success_rate": 0.85,
      "how": "pip install --no-build-isolation <package>",
      "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.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}