{
  "id": "python/pip-legacy-setup-py-develop-invocation",
  "signature": "DeprecationWarning: `setup.py develop` is deprecated. Use `pip install -e .` instead.\nerror: invalid command 'develop'",
  "signature_zh": "DeprecationWarning：`setup.py develop` 已弃用，请改用 `pip install -e .`。\n错误：无效命令 'develop'",
  "regex": "DeprecationWarning:\\ `setup\\.py\\ develop`\\ is\\ deprecated\\.\\ Use\\ `pip\\ install\\ \\-e\\ \\.`\\ instead\\.\\\nerror:\\ invalid\\ command\\ 'develop'",
  "domain": "python",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "setuptools removed the `develop` command in v64. Running `python setup.py develop` on modern setuptools fails because the command class no longer exists.",
  "root_cause_type": "generic",
  "root_cause_zh": "setuptools 在 v64 中移除了 `develop` 命令。在现代 setuptools 上运行 `python setup.py develop` 会失败，因为命令类已不存在。",
  "versions": [
    {
      "version": "setuptools>=64",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Downgrading setuptools globally breaks other packages that require newer setuptools features and is not a sustainable fix.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The --user flag does not resurrect the removed command; the error is the same.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.95,
      "how": "Use pip's editable install instead:\n\npip install -e .\n\nThis uses PEP 660 editable wheels and works with modern setuptools/hatchling/flit.",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.7,
      "how": "For legacy projects that must run setup.py directly, invoke build_editable via the backend:\n\npython -m build --wheel --no-isolation\npip install dist/mypackage-*.whl\n# or with the PEP 660 hook:\npython -c \"from setuptools import build_meta; build_meta.build_editable('/tmp/out')\"",
      "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-03-15",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}