I\'m having trouble running Python\'s pydot on Windows 7.
I installed pydot with: conda install -c rmg pydot=1.2.2
I have graphviz installed under
Other solutions didn't work for me, and I figured out pydot tried to run a hardcoded dot.bat
so I just created dot.bat
wrapper nearby dot.exe
and it worked:
@echo off
dot %*
Using django-extensions to generate the model graph for your Django application, I did this and it worked:
pip install django-extensions
pip install pyparsing
pip install graphviz
pip install pydot
conda install graphviz
Add django-extensions
to you INSTALLED_APPS
and then add C:\Program Files\Anaconda3\pkgs\graphviz-2.38.0-4\Library\bin\graphviz
to my system path variable.
Then finally and normally:
python manage.py graph_models -a -g -o pic.png
Type conda install pydot graphviz
in cmd, and then add the executables location directory C:\Anaconda3\pkgs\graphviz-2.38-hfd603c8_2\Library\bin\graphviz
to your system path variable. That works!
On Ubuntu 18.04 installing the binaries with sudo apt-get install graphviz
led to dot
being placed under /usr/bin/dot
(it might go to /usr/local/bin/dot
per their installation guide).
After doing:
pip3 install pydot-ng
and adding the following lines (similar to @Ernest's answer in Linux) to the script it worked:
import os
os.environ["PATH"] += os.pathsep + "/usr/bin/dot"
I followed the instructions given in this blog.
Then I installed graphviz from here and added C:\Program Files (x86)\Graphviz2.38\bin to PATH
.
Next I did:
conda install pydot-ng
And finally in my notebook I added the two lines below.
import os
os.environ["PATH"] += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/'
I was having trouble with this and found out that if you're using the Visual Studio Code integrated command line then you should make sure to restart Visual Studio Code (you might need to only restart the command line) otherwise the PATH changes won't take place...