'ImportError: cannot import name 'version' from 'distutils' (unknown location)

I have both the python 3.8 and 3.7 installed on Ubuntu 20.04 LTS.

python -c "from distutils import version" works fine in python 3.8 but not in python 3.7.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source