Python: Installation issues with pygraphviz and graphviz
Here are the steps I followed to get pygraphviz working for Python 3.4 (I think if you follow the analogous steps, it should work for Python 2.x). I'm just documenting it here for future visitors to the page :
Pre-requisites :
- wheel (Should be present by default in newer distributions)
- The correct Windows build of pygraphviz (unofficial builds). On Win7 x64, I selected "pygraphviz‑$version-cp34‑none‑win_amd64.whl".
(Note the
cp34
indicating the python version.) - The Graphviz installer version 2.38 (for which the above wheel is built)
Steps:
- Run the Graphviz installer
- Add the Graphviz\bin folder to your user or system PATH
- Check: Open a command prompt and execute
twopi -V
. You should be able to see the Graphviz version printed onto the console. - Now go to your Python environment (e.g. by running
anaconda.bat
, a prompt where you can runpython
) - Run
pip install pygraphviz‑*$version*-cp34‑none‑win_amd64.whl
- You're done :) ! Run an example script to see if everything went well.