PyGraphviz installation and usage

If you find the installation of PyGraphviz challenging, then don't worry, you are not alone. Recently, I faced numerous issues while installing on Ubuntu, ranging from Python 3 incompatibility to incomplete documentation. To save your time, I have listed the steps that worked for me to reach a working setup:

  1. On Ubuntu, you will need the following packages installed to install PyGraphviz:
 $ sudo apt-get install python-dev graphviz libgraphviz-dev pkg-config
  1. Now, activate your virtual environment and run pip to install the development version of PyGraphviz directly from GitHub, which supports Python 3:
$ pip install git+http://github.com/pygraphviz/pygraphviz.git#egg=pygraphviz  
  1. Next, install django-extensions ...

Get Django Design Patterns and Best Practices - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.