Missing `graphviz` - please run `conda install fastbook`

conda install python-graphviz worked for me.

pip install graphviz Works for me.

1 Like

I did essentially what @heraldb recommended, but here are the conda commands (I was less familiar with Conda so had to look this up. BTW, this GCP with Debian:

conda deactivate
conda create -n fastai
conda activate -n fastai
conda install -c fastai fastbook
conda install -c fastai fastbook

This essentially deactivates the current conda environment, creates a new ones and switches over to that and all seems to work as expected in this friendly new environment.

It did complain about another package (not graphviz) after and I installed it with conda install -c fastai

After that echo “import fastbook” | python3 works!

This just worked for me too. Thanks for (re) posting it.

Even though I just started getting an error message when I tried run my first image classification that “ImageDataBunch” not defined

I too faced this issue and run this code in the terminal in the fastbook directory.
‘pip install -r requirements.txt’
It will work.:v:

This answer worked for me on GCP. I created my GCP instance with the PyTorch environment that already included FastAi libraries and stuff. So the solutions suggesting reinstalling fastbook seemed to cause compatibility issues.

This worked for me also on WSL2 running Ubuntu 20.04

Hi,

I have installed graphviz and even imported it successfully, yet it still says graphviz not defined. Does anyone know what this means and how to fix it ? Thanks. Here’s a screenshot of my notebook:

EDIT: it turned out I have to restart the notebooks to get it to work.

I used this command:
conda install -c anaconda graphviz

I’ve tried your solution on my Ubuntu 20.04 machine - the fastbook installation didn’t work for me (glibc version compatibility problem). However simply installing graphviz with pip3 install graphviz fixed the problem.