Graphviz's executables are not found (Python 3.4)

后端 未结 26 1252
故里飘歌
故里飘歌 2020-11-29 05:00

I am running Python3.4 on Windows 7. I am trying to use the Python interface for graphviz. This is a script I intend to run:

from graphviz import Digraph
imp         


        
相关标签:
26条回答
  • 2020-11-29 05:34

    On jupyter(ipython) notebook with anaconda in win10 I solved the problem by conda install graphviz after I had installed graphviz by pip install graphviz

    0 讨论(0)
  • 2020-11-29 05:35

    Because Mac OS has not been mentioned I will add that I had the same problem on OS X Yosemite, the solution I found was to do brew install graphviz

    This solved the problem, not sure if I shouldn't have just edited one of the other answers in this list, because they all seem to be the same answer, just install an official package in addition to the Python Library.

    0 讨论(0)
  • 2020-11-29 05:36

    I had the same issue on Ubuntu(14.04) with Jupyter.

    To solve it I've added the dot library to python sys.path

    First: check if dot is installed,

    Then: find his path whereis dot -> /local/notebook/miniconda2/envs/ik2/bin/dot

    Finally in python script : sys.path.append("/local/notebook/miniconda2/envs/ik2/bin/dot")

    0 讨论(0)
  • 2020-11-29 05:36

    This is the fresh solution I've used :)

    I got the same problem, I'm using Anaconda and Jupyter Notebook.

    What I did to solve this problem is NOT to install Graphiz.zip from the intenet!

    I just did these steps:

    1. Create a new environment using >>conda create -n [env_name]
    2. install graphviz lib inside this new env: >> conda install graphviz
    3. I wrote this lines in the notebook cell and run it import os os.environ['PATH'] = os.environ['PATH']+';'+os.environ['CONDA_PREFIX']+r"\Library\bin\graphviz"

    Finally, The image is appeared, I made a small party for this because it took 3 days from me :(

    0 讨论(0)
  • 2020-11-29 05:37

    I'm using Windows 10, Python 3.6 on Anaconda 3 and have faced the same issue.

    I've had it work by doing the following in sequence:

    1. From Anaconda Terminal: pip install pydotplus
    2. From Anaconda Terminal: conda install pydotplus
    3. From Anaconda Terminal: pip install graphviz
    4. From Anaconda Terminal: conda install graphviz
    5. Went to Windows Environment Varialbes, PATH, and added the location of my dot.exe file under graphviz directory in Anaconda.

    worked fine after that.

    0 讨论(0)
  • 2020-11-29 05:40

    Just install

    conda install graphviz
    

    then install

    conda install -c conda-forge pydotplus
    
    0 讨论(0)
提交回复
热议问题