How to Solve NameError: name 'get_platform' is not defined -- sysconfig
Solution: Import the 'get_platform' module
# Add the following line to the top of your code
from sysconfig import get_platform
For more information:
sysconfig get_platform