My code is follow the class of machine learning of google.The two code are same.I don\'t know why it show error.May be the type of variable is error.But google\'s code is sa
I tried the previous answers and still got a error when running the script Therefore, I just used pydotplus
import pydotplus
and install the "graphviz" by using:
sudo apt-get install graphviz
Then it worked for me, and I added
graph = pydotplus.graph_from_dot_data(dot_data.getvalue())
graph.write_pdf("iris.pdf")
Thanks to the previous contributors.