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