Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

python sphinx - WARNING: dot command dot cannot be run

I am working on documentation for a software. And i have used graphviz directive inside my rest file.

.. graphviz::
:align: center
 

However when i run

make html

i get an error for dot command even though graphviz is installed in my virtenv (OS - mac). I have updated the conf.py to have the extension 'sphinx.ext.graphviz'

WARNING: dot command ‘dot’ cannot be run (needed for graphviz output), check the graphviz_dot setting

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The problem could be referred to an incorrect configuration of "dot" executable from GraphViz PATH.

See: https://github.com/IQSS/dataverse/pull/7230

On my windows machine, I solved it following these steps:

  1. Check if the dot installation has been performed, going in the installation path (the default installation path is: C:Program Files (x86)GraphvizX.XXin) and running here the command dot.exe
  2. Go to Control Panel > System and Security > System, and on the right side navigation panel, click the Advanced systems settings link.
  3. In Advance settings, a dialogue box opens that shows the Environment Variables button. Click the button.
  4. Select the entry Path in the system variables section and add C:Program Files (x86)GraphvizX.XXin to the existing path.

I think the problem could be solved on your OS machine just adding the PATH using the export command, such as: export PATH=$PATH:~/opt/bin

Ref: https://bobswift.atlassian.net/wiki/spaces/GVIZ/pages/20971549/How+to+install+Graphviz+software https://osxdaily.com/2014/08/14/add-new-path-to-path-command-line/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...