mgedmin/objgraph

Image renderer (dot) not found, not doing anything else

binbjz opened this issue · 2 comments

Mac Info

MacBook Pro (14-inch):
Chip:  Apple M1 Max
Memory:  64 GB
Starup disk:  Macintosh HD
MacOS: Ventura 13.3.1 (a)

Python Info

$ python -V
Python 3.11.3

Install dependency packages

$ pip install objgraph xdot graphviz

Using objgraph

$ python
Python 3.11.3 (main, Apr  6 2023, 20:15:36) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x = []
>>> y = [x, [x], dict(x=x)]
>>> import objgraph
>>> objgraph.show_refs([y], filename='sample-graph.png')
Graph written to /var/folders/kh/vtm21r5s3bz53z809m5z21d80000gn/T/objgraph-na8jmm62.dot (4 nodes)
Image renderer (dot) not found, not doing anything else
>>> import objgraph
>>> a = [1, 2, 3]
>>> b = [4, 5, 6]
>>> a.append(b)
>>> b.append(a)
>>> objgraph.show_refs([a])
Graph written to /var/folders/kh/xxxxxxgn/T/objgraph-na8xxxxxxxx.dot (4 nodes)
Image renderer (dot) not found, not doing anything else

Question

Did I miss anything? Why can't the graphics be displayed even though all the required packages have been installed?

Did I miss anything? Why can't the graphics be displayed even though all the required packages have been installed?

You did not install graphviz itself (pip install graphviz installs the Python bindings for graphviz, which is not a Python thing and thus needs to be installed separately).

I don't use a Mac and am not familiar with its packaging systems. https://graphviz.org/download/#mac has some suggestions.

@mgedmin Thanks for your reply, I will try it again.