Why is pydot unable to find GraphViz's executables in Windows 8?

前端 未结 27 2698
醉酒成梦
醉酒成梦 2020-11-27 14:26

I have GraphViz 2.32 installed in Windows 8 and have added C:\\Program Files (x86)\\Graphviz2.32\\bin to the System PATH variable. Still pydot is unable to find its executab

27条回答
  •  再見小時候
    2020-11-27 14:35

    In "pydot.py" (located in ...\Anaconda3\Lib\site-packages), replace:

    def get_executable_extension():
        # type: () -> str
        if is_windows():
            return '.bat' if is_anacoda() else '.exe'
        else:
            return ''
    

    with:

    def get_executable_extension():
        # type: () -> str
        if is_windows():
            return '.exe'
        else:
            return ''
    

    There does not seem to be any eason to add ".bat" when the system is "Windows/Anaconda" vs "Windows" and there may be no ".bat" associated with the ".exe". This seems better than adding a ".bat" for every executable pydot calls...

提交回复
热议问题