howto install pygraphviz on windows 10 64bit

前端 未结 6 2061
遇见更好的自我
遇见更好的自我 2020-12-08 16:40

Has anyone succeeded in installing pygraphviz on windows 10 64bit? I tried anaconda with python 3.5 64bit & 32bit with no success.

Here is the error I am getting

6条回答
  •  心在旅途
    2020-12-08 17:16

    Here's how I installed 64 bit PyGraphViz for Windows 10:

    Downloaded and installed GraphViz from https://www2.graphviz.org/Packages/stable/windows/10/cmake/Release/x64/graphviz-install-2.44.1-win64.exe

    Made sure I had Visual C++ installed, e.g. from here: https://visualstudio.microsoft.com/visual-cpp-build-tools/

    Then I ran:

    pip install --global-option=build_ext --global-option="-IC:\Program Files\Graphviz 2.44.1\include" --global-option="-LC:\Program Files\Graphviz 2.44.1\lib" pygraphviz
    

    Then I had to add C:\Program Files\Graphviz 2.44.1\bin to my system path before import pygraphviz worked.

    Finally, I had to run this in command prompt after the install to register plugins and be able to draw graphs: "C:\Program Files\Graphviz 2.44.1\bin\dot.exe" -c

    Obviously, for a newer version of Graphviz you'll need to check and update all the paths given above.

提交回复
热议问题