install graphviz. python 3 code example Example 1: python pip graphviz pip install graphviz Example 2: python import graphviz from graphviz import *