Installing pydot and graphviz packages in Anaconda environment

强颜欢笑 提交于 2019-12-03 00:31:50
Aleksander Lidtke

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.

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.

Rexcirus
pip install pydotplus
conda install -c anaconda graphviz=2.38.0

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

worked for me.

Victor Ikechukwu Agughasi

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

installing graphviz first and then installing pydotplus on mac, helped me. I was not able to install pydot through pip or conda or even through jupiter notebook. after installing, imported pydotplus(instead of usual pydot)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!