I succeed in installing graphviz and cgraph with
graphviz
cgraph
$ sudo pip install graphviz .... Successfully installed graphviz-0.5.1 $ sudo pip ins
sudo apt-get install python-dev graphviz libgraphviz-dev pkg-config
or the following might be needed if you're using Python 3:
sudo apt-get install python3-dev graphviz libgraphviz-dev pkg-config
then
pip install pygraphviz