I was following the AlgebraicJulia blog for Graphs and C-sets where I am encountering an IOError for the ‘dot -Tsvg’ file missing when trying to generate graph interface using the 'to_graphviz() function. I could not debug the error as it is not very clear to me. I am using the same code as mentioned in the blog, but for ease posting the code:
using Catlab
using Catlab.CategoricalAlgebra
using Catlab.Theories
using Catlab.Graphs
using Catlab.Graphics
@present SchGraph(FreeSchema) begin
V::Ob
E::Ob
src::Hom(E,V)
tgt::Hom(E,V)
end
g = Graph()
add_parts!(g, :V, 3)
add_parts!(g, :E, 4, src=[1,2,2,3], tgt=[2,3,3,3])
g
to_graphviz(g)
Error message:
ERROR: IOError: could not spawn `dot -Tsvg`: no such file or directory (ENOENT)
Ok, that seems to be another Julia package wrapping Graphviz. I was thinking of the Graphviz library/tools which are run under the hood.
Can you run dot from the command line, i.e., outside of Julia?
Even though the problem has been solved, as a fellow Catlab user I’ll just point out that Catlab assumes one of two things 1. the user has installed graphviz_jll, or 2. Graphviz (the software itself, not necessarily the julia package of the same name) itself has been installed and is accessible from the command line.