When I run a very simple code with pydot
import pydot graph = pydot.Dot(graph_type=\'graph\') for i in range(3): edge = pydot.Edge(\"king\", \"lord%d\" %
The solution was not to install pydot from somewhere, but "python-pydot" from official ubuntu repositories.