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

Solution: Import the 'graphviz' module

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

import graphviz

 

For more information:
Python graphviz