(Python) ValueError: Programmpunkt nicht im Pfad gefunden

Ich habe das folgende Problem: Ich habe ein xUbuntu-Betriebssystem und versuche, networkx in einer Flask-Anwendung zu verwenden. Ich habe den folgenden Code:

.....
import networkx as nx
......
# Creating and initializing graph object which is networkx object
hosts_graph = get_networkx_graph_object()

# Variable 'coord' where the coordinates for each node will be stored
coord = nx.pygraphviz_layout(hosts_graph, prog = 'dot')

Die letzte Zeile ist Zeile 411. Ich erhalte die folgende Fehlermeldung:

File "/home/kiril/Documents/workfolder/omeganoc-sprint/onoc/omeganoc/grapher.py", line 411, in grouping_method
    coord = nx.pygraphviz_layout(hosts_graph, prog = 'dot')
  File "/usr/local/lib/python2.7/dist-packages/networkx-1.7-py2.7.egg/networkx/drawing/nx_agraph.py", line 264, in pygraphviz_layout
    A.layout(prog=prog,args=args)
  File "/usr/local/lib/python2.7/dist-packages/pygraphviz-1.1-py2.7-linux-x86_64.egg/pygraphviz/agraph.py", line 1301, in layout
    data=self._run_prog(prog,' '.join([args,"-T",fmt]))
  File "/usr/local/lib/python2.7/dist-packages/pygraphviz-1.1-py2.7-linux-x86_64.egg/pygraphviz/agraph.py", line 1248, in _run_prog
    runprog=self._get_prog(prog)
  File "/usr/local/lib/python2.7/dist-packages/pygraphviz-1.1-py2.7-linux-x86_64.egg/pygraphviz/agraph.py", line 1236, in _get_prog
    raise ValueError("Program %s not found in path."%prog)
ValueError: Program dot not found in path.

Was könnte dieses Problem verursachen? Ich habe networkx und pygraphviz installiert, erhalte aber trotzdem diesen Fehler. Irgendwelche Ideen, wie man dieses Problem löst?

Antworten auf die Frage(4)

Ihre Antwort auf die Frage