Installing pygraphviz on windows

前端 未结 5 1758
清歌不尽
清歌不尽 2020-12-06 03:52

After installing the latest graphviz (2.26.3) on my Windows 7 Ultimate 64bit, I receive the following error:

C:>easy_install pygraphviz Searching fo

5条回答
  •  星月不相逢
    2020-12-06 04:16

    An old question but I've just done this and couldn't find a specific answer for Python 3 and I didn't have to do half of the stuff mentioned above. So here it is. I'm on Win7 64bit, 64bit Python3.4 and using a virtual environment. I'm using it to generate database schematics from django models using django-extensions, pretty useful!

    1. Download graphviz-2.38.msi from the graphviz Graphviz site
    2. Install the msi (I used cmd with Admin priviledges)

      msiexec /a graphviz-2.38.msi

    3. For some reason this doesn't add Graphviz to your system path, so you need to do that manually. For me this was

      SET PATH=%PATH%;C:\Program Files (x86)\Graphviz2.38\bin

    4. I then had to get a specific Windows pygraphviz wheel from this really useful site, specifically pygraphviz-1.3.1-cp34-none-win_amd64.whl

    5. Once I had this I then installed it using pip/mingw32 to my virtual environment

      $ pip install pygraphviz-1.3.1-cp34-none-win_amd64.whl

    Now it's all working great.

提交回复
热议问题