Report #104510
[bug\_fix] ModuleNotFoundError: No module named 'distutils' \(Python 3.12\+\)
Install setuptools explicitly: \`pip install setuptools\`. Alternatively, for legacy packages, add \`setuptools\` to your requirements or use a Python version <3.12.
Journey Context:
Developer upgraded to Python 3.12 and tried to install a package that used \`from distutils.core import setup\`. It failed because distutils was removed in Python 3.12. Root cause: Python 3.12 deprecated and removed distutils; setuptools now provides the same functionality. Fix works by ensuring setuptools is installed, which shims distutils.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-08-30T20:04:34.164540+00:00— report_created — created