ModuleNotFoundError: No module named 'distutils.sysconfig' code example

Example 1: from distutils.util import strtobool ModuleNotFoundError: No module named 'distutils.util'

$ sudo apt-get install python3.8-distutils
python3.8 -m pip install requests

Example 2: from distutils.util import strtobool ModuleNotFoundError: No module named 'distutils.util'

$ sudo apt-cache search distutils

Example 3: python 3.9 ModuleNotFoundError: No module named 'distutils.sysconfig'

sudo apt-get install python3.9-distutils --reinstall

Tags:

Misc Example