-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graphviz error No such file or directory: 'dot': 'dot' #36
Comments
Same error here. after i install pydot and graphviz, still getting the error. Any advise on how to solve this? Thanks! |
@jyoz90 you need to download the binary as well, that worked for me. |
I confirm what @guifeliper wrote work also on MacOS: you have to install graphviz on the system ( |
I solved it by installing pydot and graphiz with command |
thanks
|
FileNotFoundError Traceback (most recent call last) ~/opt/anaconda3/lib/python3.7/site-packages/pydot.py in call_graphviz(program, arguments, working_dir, **kwargs) ~/opt/anaconda3/lib/python3.7/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) ~/opt/anaconda3/lib/python3.7/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) FileNotFoundError: [Errno 2] No such file or directory: 'dot': 'dot' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) in plot_tree(estimator, features, class_names, filled) ~/opt/anaconda3/lib/python3.7/site-packages/pydot.py in new_method(f, prog, encoding) ~/opt/anaconda3/lib/python3.7/site-packages/pydot.py in create(self, prog, format, encoding) FileNotFoundError: [Errno 2] "dot" not found in path. I 'brew install graphviz' , but still has this problem. what I did is following the introduction to statistic learning by python, before this code, there is a code to find the location of graphviz find the location of graphviz so dot.exe is in the PATHimport os |
While in the virtual environment, the following installation methods does not works sudo apt install python-pydot python-pydot-ng graphviz |
ThankYou!!!!!!!!!! |
What about |
This worked for me in virtual machine with anaconda: |
Any idea why this is needed? Installing via homebrew simply installs the binary in /usr/local/Cellar as opposed to pip which installs in /usr/local/lib/python@version/site-packages. Both are available on PATH so i struggle to see why there would be a difference, even though there definitely is.. |
This worked for me on Fedora 36
|
thanks!! |
The solution using "brew install graphviz" works very fine after trying to do something in Python. Thankyou @guifeliper |
And the Homebrew command from @vlavorini works with Jupyter Notebook as well. Thanks! |
I confirm that this works on macbook. Thank you so much
|
I have an error when I try to run the command
The error bellow happens even if I have the tree.dot file and installed
pip install graphviz
The text was updated successfully, but these errors were encountered: