Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shantimohan opened this issue Jan 7, 2022 · 2 comments

Comments

@shantimohan
Copy link

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?

@wanghedy
Copy link

wanghedy commented Jan 7, 2022 via email

@amueller
Copy link
Owner

amueller commented Jun 6, 2023

you need to install both graphviz and python-graphviz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants