I want to use graphviz for graph vizualisation. I would like to use source from graphviz:
def display(self, verbose=False):
'''
Prints the QMDD as a dot graph.
'''
filename = '.tmp.dot'
self.save_as_dot(filename, verbose)
s = Source.from_file(filename)
s.view()
os.remove(filename)
# Can't manage to properly remove file .tmp.dot.pdf
I always experience this error message : ""failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH.""
I'm using a mac and a sage math in a jupyter notebook.
I've already tried to do pip3 install graphviz and brew install graphviz
. Furthermore I had the path : "/Library/SageMath/local/lib/python3.9/site-packages/graphviz" to the system path but each solutions didn't work.
TLDR: first install Graphviz and then install the Python lib.
The Python library expects the Graphviz binaries to already be installed on your operating system, and these binaries must be able to be executed from the PATH variables in your Python environment.
On Mac - See SO answer here:
sudo port install graphviz
On Linux:
sudo apt install graphviz
On Windows (yes, there is an installer but this is easier IMO):
choco install graphviz # Must be in admin terminal