jupyter used graphviz

Because I wanted to draw the decision tree in jupyter, the need to use graphviz

installation:

1. Quguan network under msi, installation

Configuring the system and user path path path \ bin and the path \ bin \ dot.exe

3.cmd the dot -version view information, the configuration was successful

4.在C:\ProgramData\Anaconda3\Scripts>pip install graphviz

However, the use also being given jupyter CalledProcessError: Command '[' dot ' ,' -Tsvg ']' returned non-zero exit status 1. [stderr: b "Error: <stdin>: syntax error in line 1 near 'None '\ R & lt \ n-"] , OS code plus Import
os.environ [" the PATH "] + = os.pathsep +' E: / the Graphviz / bin / 'nor with two lines

Then I look for a couple of days to find solutions

At last

Gangster on stack overflow solve the problem

Ohh so touched, in this

https://stackoverflow.com/questions/54243959/saving-graphviz-decision-tree-plot-using-scikit-learn-decisiontreeclassifier?r=SearchResults

I finally draw a tree

 

Guess you like

Origin www.cnblogs.com/zhanjiahui/p/11335038.html