How to Solve NameError: name 'get_platform' is not defined -- distutils

Solution: Import the 'get_platform' module

# Add the following line to the top of your code
from distutils.util import get_platform

 

For more information:
distutils get_platform