I have a weird little problem.
When I run:
import pygraphviz as pgv
a = pgv.AGraph()
print a._get_prog('neato')
I get:
ValueError: 'Program neato not found in path.'
However, when I do neato -V in a terminal:
$ neato -V
neato - graphviz version 2.28.0 (20120301.1344)
What’s the deal here?
So, I’m answering this question rather quickly, but rather than deleting it, I’ll add some text so that the next person might find it. The problem wasn’t pygraphviz at all, but Textmate 2.x being a bit weird about the
PATH. It seems that textmate uses its own path, but you can’t find this variable in the variable editor. However, you can append to it, using the normal syntax, as shown below. This fixedpygraphviz.test()for me too.