{
  "id": "python/setuptools-find-namespace-packages-deprecated",
  "signature": "SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.\n\n      Please see https://setuptools.pypa.io/en/latest/userguide/quickstart.html\n      setup.py install\n      ~~~~~~~~~~~~^\n\nSetuptoolsDeprecationWarning: The namespace_packages parameter is deprecated.",
  "signature_zh": "SetuptoolsDeprecationWarning：setup.py install 已弃用，请使用 build 和 pip 等基于标准的工具。SetuptoolsDeprecationWarning：namespace_packages 参数已弃用。",
  "regex": "SetuptoolsDeprecationWarning:\\ setup\\.py\\ install\\ is\\ deprecated\\.\\ Use\\ build\\ and\\ pip\\ and\\ other\\ standards\\-based\\ tools\\.\\\n\\\n\\ \\ \\ \\ \\ \\ Please\\ see\\ https://setuptools\\.pypa\\.io/en/latest/userguide/quickstart\\.html\\\n\\ \\ \\ \\ \\ \\ setup\\.py\\ install\\\n\\ \\ \\ \\ \\ \\ \\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\~\\^\\\n\\\nSetuptoolsDeprecationWarning:\\ The\\ namespace_packages\\ parameter\\ is\\ deprecated\\.",
  "domain": "python",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The project still uses the deprecated setup.py install path and namespace_packages keyword, which setuptools has deprecated in favor of PEP 420 native namespace packages and pyproject.toml-based builds.",
  "root_cause_type": "generic",
  "root_cause_zh": "项目仍使用已弃用的 setup.py install 路径和 namespace_packages 关键字，setuptools 已弃用它们，推荐使用 PEP 420 原生命名空间包和基于 pyproject.toml 的构建。",
  "versions": [
    {
      "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": "Suppresses warnings but the deprecated code path still runs and will be removed in future setuptools releases.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Avoids the warning but blocks security fixes and breaks on Python 3.12+ where distutils is gone.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "",
      "success_rate": 0.85,
      "how": "# remove namespace_packages from setup.cfg/setup.py\n# rely on implicit namespace packages:\n# mypkg/sub/__init__.py (implicit, no __init__ needed at mypkg level)\npip install -e .",
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "success_rate": 0.9,
      "how": "python -m pip install build\npython -m build\npip install dist/*.whl",
      "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.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2024-05-09",
  "last_confirmed": "2025-01-01",
  "last_updated": "2025-01-01",
  "evidence_count": 0,
  "tags": [],
  "locale": "en",
  "aliases": []
}