Exception: “dot” not found in path in python on mac

后端 未结 6 626
广开言路
广开言路 2021-02-05 22:38

I want to use caffe.draw to draw the caffe net by anaconda python on mac. But I got the error like this:

File \"python/draw_net.py\", line 45, in &l         


        
相关标签:
6条回答
  • 2021-02-05 22:45

    I have tried the methods in the above posts but unfortunately none worked for me. dot is an executable file but the problem is that it cannot be found by the system. Finally I managed to fix the problem by

    1. Find the graphviz library in the system. dot should be inside the bin folder.

    2. Either add the graphviz_library/bin into $PATH or create a symbolic link of dot and put it into any folder in $PATH.

    0 讨论(0)
  • 2021-02-05 22:51

    I was able to get it to work by installing graphviz through the command line:

    pip install graphviz
    pip install pydot
    
    0 讨论(0)
  • 2021-02-05 22:57

    You don't have "dot" install from source http://www.graphviz.org/pub/graphviz/CURRENT/graphviz-working.tar.gz and all works

    0 讨论(0)
  • 2021-02-05 22:58

    For me running:

    brew install gprof2dot
    

    Fixed the problem.

    0 讨论(0)
  • 2021-02-05 23:03

    If you are still getting the error, I suppose you installed pydot and graphviz using pip.

    Please use :

    sudo apt-get install graphviz
    
    pip install pydot
    

    If this gives you permission issues please use:

    sudo pip install pydot
    

    This will install the complete graphviz from Ubuntu.

    After this the draw_net.py runs correctly.

    0 讨论(0)
  • 2021-02-05 23:05

    In Mac run:

    pip install pydot
    brew install gprof2dot
    
    0 讨论(0)
提交回复
热议问题