you must install pydot and graphviz macbook code example Example: pydotprint pip install pydot==1.2.3