Thanks for your answer. And I am glad it worked for you. I also was using an Ubuntu based system.
However, in my case, the graphviz package was already installed:
$ dpkg --list | fgrep graphviz
ii graphviz 2.42.2-3build2 amd64 rich set of graph drawing tools
But the grahviz python module is missing (I checked with conda list | fgrep graphviz
).
Importing fastbook in python raises this error:
$ echo "import fastbook" | python3
/home/herald/anaconda3/envs/fastai/lib/python3.8/site-packages/fastbook/__init__.py:21: UserWarning: Missing `graphviz` - please run `conda install fastbook`
except ModuleNotFoundError: warn("Missing `graphviz` - please run `conda install fastbook`")
When I run conda install fastbook
the result is a PackagesNotFoundError
. When I run a conda install -c fastai fastbook
, it was able to find and install the module, but still same error.
Finally I fixed it by removing and recreating the conda environment and installed fastai again with conda install -c fastai -c pytorch fastai
. After that the fastbook module was not installed and I installed it with conda install -c fastai fastbook
$ conda install -c fastai fastbook
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: /home/herald/anaconda3/envs/fastai
added / updated specs:
- fastbook
The following packages will be downloaded:
package | build
---------------------------|-----------------
cairo-1.14.12 | h8948797_3 1.3 MB
cffi-1.14.0 | py38h2e261b9_0 228 KB
fastbook-0.0.8 | pyh39e3cac_0 18 KB fastai
fastscript-1.0.0 | pyh39e3cac_0 15 KB fastai
fribidi-1.0.10 | h7b6447c_0 115 KB
glib-2.63.1 | h5a9c865_0 3.4 MB
graphite2-1.3.14 | h23475e2_0 102 KB
harfbuzz-1.8.8 | hffaf4a1_0 863 KB
libffi-3.2.1 | hd88cf55_4 43 KB
nbdev-1.0.1 | pyh39e3cac_0 51 KB fastai
pango-1.42.4 | h049681c_0 528 KB
pixman-0.40.0 | h7b6447c_0 628 KB
python-3.8.2 | hcf32534_0 57.8 MB
python-graphviz-0.14 | py_0 25 KB
------------------------------------------------------------
Total: 65.1 MB
The following NEW packages will be INSTALLED:
cairo pkgs/main/linux-64::cairo-1.14.12-h8948797_3
fastbook fastai/noarch::fastbook-0.0.8-pyh39e3cac_0
fastscript fastai/noarch::fastscript-1.0.0-pyh39e3cac_0
fribidi pkgs/main/linux-64::fribidi-1.0.10-h7b6447c_0
graphite2 pkgs/main/linux-64::graphite2-1.3.14-h23475e2_0
graphviz pkgs/main/linux-64::graphviz-2.40.1-h21bd128_2
harfbuzz pkgs/main/linux-64::harfbuzz-1.8.8-hffaf4a1_0
nbdev fastai/noarch::nbdev-1.0.1-pyh39e3cac_0
pango pkgs/main/linux-64::pango-1.42.4-h049681c_0
pixman pkgs/main/linux-64::pixman-0.40.0-h7b6447c_0
python-graphviz pkgs/main/noarch::python-graphviz-0.14-py_0
The following packages will be DOWNGRADED:
cffi 1.14.1-py38he30daa8_0 --> 1.14.0-py38h2e261b9_0
glib 2.65.0-h3eb4bd4_0 --> 2.63.1-h5a9c865_0
libffi 3.3-he6710b0_2 --> 3.2.1-hd88cf55_4
python 3.8.5-hcff3b4d_0 --> 3.8.2-hcf32534_0
Proceed ([y]/n)?
After that I installed jupyter notebook of course. And then the environment was operational again.
On another system (Fedora based) I installed fastai using pip. Initially I had the same problem, but removing all existing python modules and doing a pip install --user fastai
followed by pip install --user graphviz
gave me back a workable environment.
Cheers,
Herald