環境
- Python 3.6
エラーの内容
import mglearn
mglearn.plots.plot_animal_tree()
ってやると
ExecutableNotFound: failed to execute ['dot', '-Tpng', '-O', 'tmp'], make sure the Graphviz executables are on your systems' PATH
ってエラーになる。 pip install graphviz
は実行済み
対策
graphviz本体?を別途インストールする必要がある
Macなら
brew install graphviz
Ubuntuなら
apt install graphviz
import mglearn import matplotlib.pyplot as plt mglearn.plots.plot_animal_tree() plt.show()
できた