2016-10-19 5 views
0

私はpydotパッケージをコマンドラインでpipを使ってインストールしました。 私はパッケージをインポートしても、オブジェクトを作成しますが、私は、グラフを作成したいときにすることができますPydotはグラフを作成しません

graph.write_jpg('example1_graph.jpg') 

私は次のエラーを取得する:

Exception: "dot.exe" not found in path. 
+1

使用しているOSは何ですか? –

+0

Windows 7 Enterprise 64 – Westerby

答えて

0

はGraphvizの\ binフォルダを追加し、手動で試してみてくださいあなたのシステムPATHに。

>>> import pydot 
>>> pydot.find_graphviz() 
{'dot': 'C:\\Program Files (x86)\\Graphviz 2.28\\bin\\dot.exe'} #... 
>>> print pydot.find_graphviz.__doc__ 
""" 
Locate Graphviz's executables in the system. 

    Tries three methods: 

    First: Windows Registry (Windows only) 
    This requires Mark Hammond's pywin32 is installed. 

    Secondly: Search the path 
    It will look for 'dot', 'twopi' and 'neato' in all the directories 
    specified in the PATH environment variable. 

    Thirdly: Default install location (Windows only) 
    It will look for 'dot', 'twopi' and 'neato' in the default install 
    location under the "Program Files" directory. 

    It will return a dictionary containing the program names as keys 
    and their paths as values. 

    If this fails, it returns None. 
""" 
+0

こんにちは、お返事ありがとうございます。しかし、実行時に問題があります。 – Westerby

+0

pydot.find_graphviz() エラー: – Westerby

+0

AttributeError: 'pydot'モジュールに 'find_graphviz'属性がありません – Westerby

関連する問題