“RuntimeError: Make sure the Graphviz executables are on your system's path” after installing Graphviz 2.38

后端 未结 29 2264
感动是毒
感动是毒 2020-12-02 06:00

I downloaded Graphviz 2.38 MSI version and installed under folder C:\\Python34, then I run pip install Graphviz, everything went well.

29条回答
  •  粉色の甜心
    2020-12-02 06:20

    #Write this on anaconda prompt in admin mode
    conda install -c anaconda graphviz
    conda install -c conda-forge python-graphviz
    conda install -c conda-forge/label/broken python-graphviz
    conda install -c conda-forge/label/cf201901 python-graphviz
    conda install -c conda-forge/label/cf202003 python-graphviz
    
    #check dot -v in window's cmd prompt
    C:\WINDOWS\system32>dot -V
    dot - graphviz version 2.38.0 (20140413.2041)
    (this means graphviz installed successfully)
    
    #Add path to sys and user eve variables
    PATH
    C:\Anaconda3\pkgs\graphviz-2.38-hfd603c8_2\Library\bin
    (search bin folder of graphviz and then copy n paste path in env variables)
    
    #Re-run all cmds in jyupter notebook
    #if error occurs (less chances)
    #then 
    #Restart anaconda and again run all cmds in jyupter notebook
    eg.
    import graphviz as gp
    with open("tree.dot") as f:
        dot_read=f.read()
    display(gp.Source(dot_read))
    

提交回复
热议问题