Install pydot and graphviz packages in Anaconda environment

I want to be able to create graphical decision trees in Python, and I'm currently trying to install both pydot and graphviz .

I use Anaconda as my environment (along with Spyder) and try to run the following lines of code

 conda install -c https://conda.binstar.org/t/TOKEN/j14r pydot 

with the result

 Error: unknown host: http://repo.continuum.io/pkgs/pro/win-32/ Error: unknown host: http://repo.continuum.io/pkgs/free/win-32/ Error: unknown host: https://conda.binstar.org/t/TOKEN/j14r/win-32/ Error: No packages found matching: pydot 

I also tried using pip install pydot and pip install graphviz with similar results:

 Downloading/unpacking pydot Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pydot Cleaning up... No distributions at all found for pydot Storing complete log in [...] 

I get really bored trying to figure out how to do this, so I was hoping that someone out there could give me some advice.

thanks

+7
source share
5 answers

I had the same problem and it was solved (order is important ):

  • Install graphviz , just through sudo apt-get install graphviz
  • Installing graphviz for Python via conda sudo ~/anaconda2/bin/conda install graphviz
  • Finally installing pydot using conda sudo ~/anaconda2/bin/conda install pydot

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

PS apparently there may be some problems with step 1 of the above algorithm, this post mentions how to fix them.

+5
source
 pip install pydotplus conda install -c anaconda graphviz=2.38.0 

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

worked for me.

+1
source

pip install pydot should now install version 1.2.3 from PyPI . Since OP time, a distribution kit for pydot been loaded into PyPI.

+1
source

Just instituted it See if this works for you ...

1) Open "Anaconda Prompt" by simply pressing WINDOW + S (for Windows users) and enter CMD. Then select accordingly.

2) Enter the command " pip install pydot "

3) Follow the on-screen information.

NOTE. I am using Conda version 4.3.21 and Python 3.6

And the implementation of the decision tree below:

Graphical visualization of the decision tree

0
source

At first I was able to install graphvis, and then install pydotplus on Mac. I could not install pydot through pip, conda or even through Jupiter's laptop. after installation, pydotplus is imported (instead of the usual pydot)

0
source

Source: https://habr.com/ru/post/979614/


All Articles