I’m watching lesson 2. At 33:47, Jeremy uses graphviz to draw a decision tree with draw_tree(m.estimators_[0], df_trn, precision=3)
.
I’m using Crestle. When I run this command, I get the error shown below. Did I miss something that I needed to do to set up Crestle?
---------------------------------------------------------------------------
FileNotFoundError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/graphviz/backend.py in pipe(engine, format, data, quiet)
153 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
--> 154 startupinfo=STARTUPINFO)
155 except OSError as e:
/usr/lib/python3.6/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)
708 errread, errwrite,
--> 709 restore_signals, start_new_session)
710 except:
/usr/lib/python3.6/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, restore_signals, start_new_session)
1343 err_msg += ': ' + repr(err_filename)
-> 1344 raise child_exception_type(errno_num, err_msg, err_filename)
1345 raise child_exception_type(err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot'
During handling of the above exception, another exception occurred:
ExecutableNotFound Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/IPython/core/formatters.py in __call__(self, obj)
343 method = get_real_method(obj, self.print_method)
344 if method is not None:
--> 345 return method()
346 return None
347 else:
/usr/local/lib/python3.6/dist-packages/graphviz/files.py in _repr_svg_(self)
104
105 def _repr_svg_(self):
--> 106 return self.pipe(format='svg').decode(self._encoding)
107
108 def pipe(self, format=None):
/usr/local/lib/python3.6/dist-packages/graphviz/files.py in pipe(self, format)
123 data = text_type(self.source).encode(self._encoding)
124
--> 125 outs = backend.pipe(self._engine, format, data)
126
127 return outs
/usr/local/lib/python3.6/dist-packages/graphviz/backend.py in pipe(engine, format, data, quiet)
155 except OSError as e:
156 if e.errno == errno.ENOENT:
--> 157 raise ExecutableNotFound(args)
158 else: # pragma: no cover
159 raise
ExecutableNotFound: failed to execute ['dot', '-Tsvg'], make sure the Graphviz executables are on your systems' PATH
<graphviz.files.Source at 0x7eff4d873400>