pydot and graphviz error: Couldn't import dot_parser, loading of dot files will not be possible

后端 未结 14 1400
臣服心动
臣服心动 2020-11-28 01:15

When I run a very simple code with pydot

import pydot
graph = pydot.Dot(graph_type=\'graph\')

for i in range(3):

  edge = pydot.Edge(\"king\", \"lord%d\" %         


        
14条回答
  •  误落风尘
    2020-11-28 02:21

    There are now at least 2 more versions that appear to support PyParsing-2 and Python-3:

    • PyDotPlus by Carlos Jenkins with a nice travis buildbot and fancy documentation. However you will need to change its folder name from site-packages\pydotplus to site-packages\pydot for it to work with existing programs that import pydot.
    • pydot3k by bmcorser. Sadly, did not work!
    • prologic/pydot by James Mills linked to from the official pydot Google code page as ...

      a branch for Python 3 compatibility

    • and here is a working link to David Villa's pydot2 which works fine: https://pypi.python.org/pypi/pydot2/1.0.32

提交回复
热议问题