| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1564 人关注过本帖
标题:请教各位大神: Python中已经配置好GraphViz,但是仍然不能运行plot tree
只看楼主 加入收藏
zhiyong75
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2020-3-12
结帖率:33.33%
收藏
已结贴  问题点数:20 回复次数:1 
请教各位大神: Python中已经配置好GraphViz,但是仍然不能运行plot tree
各位大神:

我在window系统已经安装好Graphviz,但是在python里面运行如下语句:

plot_tree(clf, num_trees=0), 系统报错如下:

ExecutableNotFound: failed to execute ['dot', '-Tpng'], make sure the Graphviz executables are on your systems' PATH

所有的工作感觉都做了,包括安装Graphviz,配置环境变量,不知道问题出在哪里,跪谢大神!
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: plot 配置 Python tree 运行 
2020-04-07 17:05
thhkb
Rank: 3Rank: 3
等 级:论坛游侠
威 望:1
帖 子:25
专家分:107
注 册:2020-4-11
收藏
得分:20 
你还要pip install pydot
如果还是有错,需要在pydot.py文件中修改
def set_prog(self, prog):
        """Sets the default program.

        Sets the default program in charge of processing
        the dot file into a graph.
        """
        #path = r'C:/Program File (x86)/Graphviz2.38/bin'
        #prog  = os.path.join(path, prog)
        #prog += '.exe'
        self.prog = prog
        #return prog
在def create()函数中修改
if prog is None:
            prog = self.prog
        
        assert prog is not None
        #prog = self.set_prog('dot') #调用函数

潜水,灌水。
2020-04-11 23:47
快速回复:请教各位大神: Python中已经配置好GraphViz,但是仍然不能运行plot t ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.016454 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved