Skip to content

AttributeError: module 'graphviz' has no attribute 'Digraph' or 'Source' #155

Description

@shantimohan

When running code for "Supervised Learning":
'Digraph' is not found when running

mglearn.plots.plot_animal_tree()
'Source' is not found when running

display(graphviz.Source(dot_graph))

I have installed graphviz using Anaconda. First it gave error of not finding ENCODING. Then I installed using the following command:

conda install graphviz

Then it started giving above errors. As this didn't work, I reinstalled graphviz using the following command:

conda install -c conda-forge graphviz
That also didn't work.

In Anconda Navigator the version of graphviz is shown as 2.38.
What am I doing wrong?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions