Report #97638
[bug\_fix] ModuleNotFoundError: No module named 'distutils'
Install setuptools: \`pip install setuptools\`. On Python 3.12\+, distutils has been removed; setuptools provides it. For CI, pin \`setuptools>=68.0\`.
Journey Context:
A developer upgraded their project to Python 3.12 and ran \`pip install -r requirements.txt\`. The install failed with ModuleNotFoundError for 'distutils'. They found that old projects relying on \`distutils\` \(e.g., setuptools < 68\) are broken. They searched and discovered that Python 3.12 removed the deprecated distutils module. The fix was to upgrade setuptools to the latest version, which includes a backport of distutils. After running \`pip install --upgrade setuptools\`, the installation succeeded.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-25T15:46:46.090857+00:00— report_created — created