Search code examples
pygraphvizgoogle-colaboratory

Installing pygrahviz in google colab


In order to install graphviz, one can follow, this example: https://colab.research.google.com/drive/1_Qb92Hj5_f2rpta67JC0JKXwE2581Ar-#scrollTo=BOa9gIcDo6GS

When I try to install pygraphviz (https://pygraphviz.github.io/) via (https://pypi.org/project/pygraphviz/)

with

!pip install pygraphviz
import pygraphviz as pgv

i get the error

ERROR: Failed building wheel for pygraphviz

although I installed graphviz before. Why?


Solution

  • You don't need to pip install anything.

    Just import graphviz, not pygraphviz.

    My minimal example:

    https://colab.to/1PVtFECaDgMfVjed4XNtvyeL4pyMvPdAT