如何在anaconda中安装pydotplus

来源:互联网 发布:java异常处理 编辑:程序博客网 时间:2024/05/22 16:41

在用Python学习构建决策树是,需要可视化已构建好的决策树,需要用到pydotplus包,那面如何在anaconda中安装呢?


使用如下代码:

conda install -c conda-forge pydotplus


http://stackoverflow.com/questions/36979421/how-can-i-use-conda-to-install-pydotplus/40719179


此时,如果未安装graphviz,程序还是会报错的

graphviz下载地址:

http://www.graphviz.org/Download_windows.php


处理过程:

The problem is that the path to GraphViz was not found by the pydot module as shown in the traceback:

'GraphViz\'s executables not found'

I solved this problem on my windows 7 machine by adding the GraphViz bin directory to my computer's PATH. Then restarting my python IDE to use the updated path.

  1. Install GraphViz if you haven't already (I used the MSI download)
  2. Get the path for gvedit.exe (for me it was "C:\Program Files (x86)\Graphviz2.34\bin\")
  3. Add this path to the computer's PATH
  4. One way to get to environment settings to set your path is to click on each of these button/menu options: start->computer->system properties->advanced settings->environment variables
  5. Click Edit User path
  6. Add this string to the end of your Variable value list (including semicolon): ;C:\Program Files (x86)\Graphviz2.34\bin
  7. Click OK
  8. Restart your Python IDE

0 0
原创粉丝点击