Skip to content Skip to sidebar Skip to footer

Installing Pydot And Graphviz Packages In Anaconda Environment

I want to be able to create graphical decision trees in Python, and I am currently trying to install both pydot and graphviz. I am using Anaconda as my environment (along with Spyd

Solution 1:

I had the same issue and solved it by (order is important):

  1. Installing graphviz, simply via sudo apt-get install graphviz
  2. Installing graphviz for Python via conda sudo ~/anaconda2/bin/conda install graphviz
  3. Finally, by installing pydot using conda sudo ~/anaconda2/bin/conda install pydot

This answer is overdue but this post helped me (together with this one that mentions the installation order), so hopefully this answer will help someone else. I'm using Ubuntu 14.04 and Python 2.7.

P.S. apparently, there could be some issues with step 1 of the above algorithm, this post mentions how to fix them.

Solution 2:

pip install pydotplus
conda install -c anaconda graphviz=2.38.0

(see here for latest versions https://anaconda.org/anaconda/graphviz)

worked for me.

Solution 3:

the problem is solved for me by installing

  1. pydot conda install -c anaconda pydot
  2. graphviz conda install -c conda-forge python-graphviz

Solution 4:

pip install pydot should now install version 1.2.3 from PyPI. Since the time of the OP, a distribution for pydot has been uploaded to PyPI.

Solution 5:

Just Installed it Please see if this works for you...

1) Open the "Anaconda Prompt" by simply pressing WINDOW + S (for Windows OS Users) and type CMD. Then Select accordingly.

2) Type the command "pip install pydot"

3) Follow the onscreen information.

NOTE: I'm using Conda version 4.3.21 and Python 3.6

And Decision Tree Implementation below:

Graphical Visualization of the Decision Tree

Post a Comment for "Installing Pydot And Graphviz Packages In Anaconda Environment"