How to Solve NameError: name 'clr' is not defined

Solution: Import the 'clr' module

To Solve the error, add the following line to the top of your code.

import clr

 

For more information:
Python clr