## (求助關于anaconda的問題)
這個是我在看python機器學習基礎這本書時遇到的問題,整了兩天也沒明白,求助各位大佬
```
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import mglearn
from sklearn.model_selection import train_test_split
mglearn.plots.plot_animal_tree()
```
```
FileNotFoundError Traceback (most recent call last)
D:\anaconda\lib\site-packages\graphviz\backend.py in run(cmd, input, capture_output, check, encoding, quiet, **kwargs)
163 try:
--> 164 proc = subprocess.Popen(cmd, startupinfo=get_startupinfo(), **kwargs)
165 except OSError as e:
D:\anaconda\lib\subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
799 errread, errwrite,
--> 800 restore_signals, start_new_session)
801 except:
D:\anaconda\lib\subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
1206 os.fspath(cwd) if cwd is not None else None,
-> 1207 startupinfo)
1208 finally:
FileNotFoundError: [WinError 2] 系統找不到指定的檔案。
During handling of the above exception, another exception occurred:
ExecutableNotFound Traceback (most recent call last)
<ipython-input-10-68d9ec4b28dc> in <module>
----> 1 mglearn.plots.plot_animal_tree()
D:\anaconda\lib\site-packages\mglearn\plot_animal_tree.py in plot_animal_tree(ax)
23 mygraph.edge("2", "5", label="True")
24 mygraph.edge("2", "6", label="False")
---> 25 mygraph.render("tmp")
26 ax.imshow(imread("tmp.png"))
27 ax.set_axis_off()
D:\anaconda\lib\site-packages\graphviz\files.py in render(self, filename, directory, view, cleanup, format, renderer, formatter, quiet, quiet_view)
207 rendered = backend.render(self._engine, format, filepath,
208 renderer=renderer, formatter=formatter,
--> 209 quiet=quiet)
210
211 if cleanup:
D:\anaconda\lib\site-packages\graphviz\backend.py in render(***failed resolving arguments***)
219 cwd = None
220
--> 221 run(cmd, capture_output=True, cwd=cwd, check=True, quiet=quiet)
222 return rendered
223
D:\anaconda\lib\site-packages\graphviz\backend.py in run(cmd, input, capture_output, check, encoding, quiet, **kwargs)
165 except OSError as e:
166 if e.errno == errno.ENOENT:
--> 167 raise ExecutableNotFound(cmd)
168 else:
169 raise
ExecutableNotFound: failed to execute ['dot', '-Tpng', '-O', 'tmp'], make sure the Graphviz executables are on your systems' PATH
```
uj5u.com熱心網友回復:
沒加環境變數?uj5u.com熱心網友回復:
我加了好多還是不行
uj5u.com熱心網友回復:
我加了好多還是不行
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/24868.html
上一篇:寫給程式員的機器學習入門 (五) - 遞回模型 RNN,LSTM 與 GRU
下一篇:感知機
