I am using python through a secure shell. When I use pydot and graphviz package, it shows error [Errno 2] dot not found in path. I searched so many solutions. People suggest 'sudo apt install graphviz' or 'sudo apt-get install graphviz'. But when I use 'sudo', it shows 'username is not in the sudoers file.This incident will be reported'. I also tried to add the graphviz folder location to PATH variable using 'export PATH= $PATH:/..../lib/python3.8/site-packages/graphviz'( exact path is shown in the picture), it doesn't work. Could anyone help please? Thank you very much. I added a screenshot. I understand that I need to add path including 'bin' enter image description here, but then I didnt find the bin folder. I know what that folder looks like on Windows. When I use Filezilla to check this graphviz folder, It doesn't have this 'bin' folder. I installed Graphviz using 'pip3 install graphviz' when I search "How do I install Graphviz on Linux?", they all say 'sodu .....', which doesn't work for me apparently . Could anyone help please?
Asked
Active
Viewed 565 times
2 Answers
0
- Explicitly check if the Graphviz programs are installed. Type dot -V. Did you get a "command not found" response or something else?
- If you are not the administrator of the Linux system, find the administrator and ask them to install Graphviz.
- If the administrator can not or will not install Graphviz:
- You can try to build (compile) a private copy of Graphviz, but it won't be easy
- You can install WSL (Windows Subsystem Linux) and then Ubuntu and finally Graphviz on your PC, easier, but not trivial
- Mooch an old PC and install Linux on it, becoming the administrator. Then sudo all you want. Again lots of work.
Good luck

sroush
- 5,375
- 2
- 5
- 11
-
graphviz is installed( I used 'import graphviz' to check). So that secure shell is provided by university. I used ' pip3 install graphviz' . and you are right, when I type dot -V it does show' command not found'. Thanks for all your suggestions. I am wondering if I could use 'add to path' as I explained in the question. Could you tell me a bit more about that please? – Gina Dec 31 '20 at 10:45
-
[I do not use the Python interface to Graphviz, so this is just a guess] While you have installed the Python interface to Graphviz, that does not necessarily mean that Graphviz itself is installed (read https://pypi.org/project/graphviz/). Ask your administrator if the Graphviz package is installed. – sroush Jan 02 '21 at 18:06
0
Had a similar issue on Debian GNU/Linux, it gone after i install this:
apt install graphviz
apt install graphviz-dev
After this you can check that it works with
dot -V
You'll get responce like dot - graphviz version 2.43.0 (0)
if problem is fixed

weAreStarsDust
- 2,634
- 3
- 10
- 22