[anaconda] anaconda - graphviz - can't import after installation

Just installed a package through anaconda (conda install graphviz), but ipython wouldn't find it.

I can see a graphviz folder in C:\Users\username\Anaconda\pkgs

But there's nothing in: C:\Users\username\Anaconda\Lib\site-packages

still wouldn't work

This question is related to anaconda conda graphviz

The answer is


I have followed the following steps and it worked fine for me.

1 . Download and install graphviz-2.38.msi from https://graphviz.gitlab.io/_pages/Download/Download_windows.html

2 . Set the path variable

(a) Control Panel > System and Security > System > Advanced System Settings >  Environment Variables > Path > Edit

(b) add 'C:\Program Files (x86)\Graphviz2.38\bin'

Remeber! If you are using jupyter notebook, please restart it after the installing. That's work for me.

Because the condition before is a static variate as below:

enter image description here

enter image description here

enter image description here


I am using anaconda for the same.

I installed graphviz using conda install graphviz in anaconda prompt. and then installed pip install graphviz in the same command prompt. It worked for me.


I tried this way and worked for me.

conda install -c anaconda graphviz
pip install graphviz

Check if tensorflow is activated in your terminal

first deactivate it using

conda deactivate

then use the command

conda install python-graphviz

and then install

conda install graphviz

this is solution for UBUNTU USERS :) CHEERS :)


You can actually install both packages at the same time. For me:

conda install -c anaconda graphviz python-graphviz

did the trick.


For ubuntu users I recommend this way:

sudo apt-get install -y graphviz libgraphviz-dev

Graphviz is evidently included in Anaconda so as to be used with pydot or pydot-ng (both of which are included in Anaconda). You may want to consider using one of those instead of the 'graphviz' Python module.


run this: conda install python-graphviz


On conda:

First install

conda install graphviz

Then the python-library for graphviz python-graphviz

gv_python is a dynamically loaded extension for python that provides access to the graph facilities of graphviz.

conda install python-graphviz

There is also pydot package, which can parse and dump into DOT language, used by GraphViz

conda install pydot

for me the problem was solved by installing another supportive package.

so I installed graphviz package through anaconda then I failed to import it

after that I installed a second package named python-graphviz also through anaconda

then I succeeded in importing graphviz module into my code

I hope this will help someone :)


This command works officially for python:

conda install -c conda-forge python-graphviz

To install graphviz,

conda install -c anaconda graphviz
pip install graphviz

If conda command not found. Follow these:

export PATH=~/anaconda/bin:$PATH
conda --version # to check your conda version

Difference between conda and pip installation,
refer this stackoverflow answer


Examples related to anaconda

Upgrade to python 3.8 using conda Updating Anaconda fails: Environment Not Writable Error Jupyter Notebook not saving: '_xsrf' argument missing from post Conda version pip install -r requirements.txt --target ./lib How to check python anaconda version installed on Windows 10 PC? Anaconda / Python: Change Anaconda Prompt User Path How to access Anaconda command prompt in Windows 10 (64-bit) Conda activate not working? update to python 3.7 using anaconda Tensorflow import error: No module named 'tensorflow'

Examples related to conda

Upgrade to python 3.8 using conda How do I prevent Conda from activating the base environment by default? Conda version pip install -r requirements.txt --target ./lib Removing Conda environment PackagesNotFoundError: The following packages are not available from current channels: Conda activate not working? ModuleNotFoundError: No module named 'sklearn' How do I update Anaconda? Conda command is not recognized on Windows 10 'Conda' is not recognized as internal or external command

Examples related to graphviz

"RuntimeError: Make sure the Graphviz executables are on your system's path" after installing Graphviz 2.38 anaconda - graphviz - can't import after installation Graphviz's executables are not found (Python 3.4) Why is pydot unable to find GraphViz's executables in Windows 8? How to use doxygen to create UML class diagrams from C++ source Graphviz: How to go from .dot to a graph?