windows下安装pygraphviz

我来回答吧,windows 下安装pygraphviz:
1.首先安装graphviz,  http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.28.0.msi
2.下载pygraphviz源码包,http://pypi.python.org/packages/source/p/pygraphviz/pygraphviz-1.1.zip#md5=9b9958f10bdf29c06d9f43e225f6ac0c
3. 解压后修改setup.py,三个地方要改
    library_path=r'D:\develop\Graphviz 2.28\bin'   #按你的graphviz路径修改
    include_path=r'D:\develop\Graphviz 2.28\include\graphviz'   #按你的graphviz路径修改
    runtime_library_dirs=None

4. python setup.py build -c mingw32   要先确定已安装mingw32
    python setup.py install

按上述方法就可以安装成功。
posted @ 2012-03-05 13:19  babykick  阅读(1564)  评论(0编辑  收藏  举报