Report #103716
[bug\_fix] ModuleNotFoundError: No module named 'distutils'
Install \`distutils\` via system package manager \(e.g., \`sudo apt-get install python3-distutils\` on Debian/Ubuntu\) or upgrade to Python 3.12\+ where \`distutils\` is removed and use \`setuptools\` instead.
Journey Context:
Developer tried to install a package using \`pip install some-package\` on a fresh Ubuntu 22.04 system with Python 3.10. The installation failed with 'ModuleNotFoundError: No module named 'distutils''. They discovered that \`distutils\` is part of Python's standard library but is not always included in minimal Python installations on some Linux distributions. The root cause is that \`distutils\` is a separate package on Debian-based systems. The fix is to install it via the system package manager. In Python 3.12, \`distutils\` was removed entirely, so projects must use \`setuptools\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-12T20:07:34.939415+00:00— report_created — created