I want to plot the tree generated by DEAP using pygraphviz. I tried to follow the example in this DEAP document, but got the following error:
Traceback (most recent call last):
File "<input>", line 24, in <module>
File "C:\Users\xxyao\program\anaconda\envs\rf\lib\site-packages\pygraphviz\agraph.py", line 1399, in layout
data = self._run_prog(prog, ' '.join([args, "-T", fmt]))
File "C:\Users\xxyao\program\anaconda\envs\rf\lib\site-packages\pygraphviz\agraph.py", line 1364, in _run_prog
raise IOError(b"".join(errors).decode(self.encoding))
OSError: Format: "dot" not recognized. Use one of:
It seems like should be some words after the Use one of: but there is not. My environment is Python==3.6,graphviz==3.41,pygraphviz==1.5.The graphvizand pygraphviz are installed via conda.
By the way, I tried the following method:
C:\Program Files (x86)\Graphviz2.38\bin to system environment. conda install pydot, conda install pydot-ng but it still doesn't work.
Further infomation: Other layout provided by pygraphviz such as neato fdp twopi works well. Only the dot doesn't work!
I had the same problem. And solved it by executed "dot -c" in conda cmd.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With