9

I would like to create diagram class using pyreverse. I download it, and when I use this command:

pyreverse.bat -c PyreverseCommand -a1 -s1 -f ALL -o png  test.py

I get an error "The name 'dot' is not recognized....". What is "dot", how can I create diagram class?

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Kamilos
  • 167
  • 1
  • 2
  • 10

1 Answers1

11

dot is part of Graphviz (http://www.graphviz.org/About.php). You need to install Graphviz and then modify your PATH so Windows (what I assume you are using) can find it. "the command pyreverse generates the diagrams in all formats that graphviz/dot knows." (http://www.logilab.org/blogentry/6883.)

Once installed dot executable can be found in C:\Program Files (x86)\Graphviz2.36\bin\

To make sure it was installed properly run the comand

C:\Program Files (x86)\Graphviz2.36\bin>dot -Txxx

And you should see something like: "Format: "xxx" not recognized. Use one of: bmp canon cmap cmapx cmapx_np dot emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg metafile pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot xdot1.2 xdot1.4"*

You can download Graphviz here: http://www.graphviz.org/Download_windows.php

zom-pro
  • 1,571
  • 2
  • 16
  • 32
  • 2
    Link for download no longer working, but you can get it from here: https://graphviz.gitlab.io/_pages/Download/Download_windows.html. After installing this and adding it to path I can run the `dot -Txxx` command, but it still says `Command 'pyreverse' cannot be found` when I try to run pyreverse. – ChrisProsser Apr 04 '19 at 06:14