Your script seems to be unable to find the pygraphviz
module. To fix that, you should make sure that pygraphviz
is in your Python's sys.path
.
In case you find out the module is not installed, you have two alternative ways of installing it:
sudo apt-get install python-pygraphviz
(as suggested by the error message),sudo apt-get install graphviz libgraphviz-dev
and
sudo pip install pygraphviz --install-option='--include-path=/usr/include/graphviz' --install-option='--library-path=/usr/lib/graphviz'
This is the method I strongly recommend, which usespip
, the Python package installer. Specifying the options is required because otherwise the pygraphviz installer seems unable to find the paths.