FileNotFoundError: [Errno 2] "dot" not found in path
See original GitHub issueDescription
I tried to use pydot to plot a decision tree but i got this error, i will provide the code used in order to reproduce that situation Main.py
$ /home/sys-walker/Documentos/PyCharmProjects/PlotDesicionTree/venv/bin/python /home/sys-walker/Documentos/PyCharmProjects/PlotDesicionTree/Main.py
Traceback (most recent call last):
File "/home/sys-walker/Documentos/PyCharmProjects/PlotDesicionTree/Main.py", line 34, in <module>
graph.write_png('example1_graph.png')
File "/home/sys-walker/Documentos/PyCharmProjects/PlotDesicionTree/venv/lib/python3.8/site-packages/pydot.py", line 1743, in new_method
self.write(
File "/home/sys-walker/Documentos/PyCharmProjects/PlotDesicionTree/venv/lib/python3.8/site-packages/pydot.py", line 1828, in write
s = self.create(prog, format, encoding=encoding)
File "/home/sys-walker/Documentos/PyCharmProjects/PlotDesicionTree/venv/lib/python3.8/site-packages/pydot.py", line 1933, in create
raise OSError(*args)
FileNotFoundError: [Errno 2] "dot" not found in path.
^
Time: 0.002s
sys-walker@(none):sys-walker>
Environment used
- OS and python version information.
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
(venv) sys-walker@sys-walker:~/Documentos/PyCharmProjects/PlotDesicionTree$ python --version
Python 3.8.5
- Pydot version used.
pydot version 1.4.2
- Output of
pip freeze
command.
$ pip3 freeze
pkg-resources==0.0.0
pydot==1.4.2
pyparsing==2.4.7
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Exception: "dot" not found in path in python on mac
For me running: brew install gprof2dot. Fixed the problem.
Read more >[SOLVED] OSError: [Errno 2] "dot" not found in path.
When trying to visualize data using pydot in Python you might run into an error where it is stated that “dot” is not...
Read more >FileNotFoundError: [Errno 2] "dot" not found in path - Streamlit
I tried to deploy my app on Streamlit share. But I ran into the error: FileNotFoundError: [Errno 2] “dot” not found in path....
Read more >FAQ - QSDsan 1.2.1
FileNotFoundError : [Errno 2] No such file or directory: 'dot' ... ['dot', '-Kdot', '-Tpng'], make sure the Graphviz executables are on your systems'...
Read more >failed to import pydot. you must install pydot and graphviz for ...
FileNotFoundError: (Errno 2) dot'' not found in path ... In other words, you can make sure that the user has indeed typed a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Do you have Graphviz installed? What is the output of running
dot -V
from the command line?Should be solved as part of pydot/pydot#218. That PR is currently closed, but I hope to reopen it in the future.