Then finally and normally: python manage.py graph_models -a -g -o pic.png
Using django-extensions to generate the model graph for your Django application, I did this and it worked: pip install django-extensionsĪdd 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. 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: off This will take your installation to Python 2.7 That works!ĭon’t use the following command if you are on Python 3: conda install pydot-ng 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. Os.environ += os.pathsep + 'C:/Program Files (x86)/Graphviz2.38/bin/' Then I installed graphviz from here and added C:\Program Files (x86)\Graphviz2.38\bin to PATH.Īnd finally in my notebook I added the two lines below. I followed the instructions given in this blog. Graphiv2.38/bin/ where the dot.exe file is located. I have tried this solution: Permanently adding a file path to sys.path in Python, by adding the my-paths.pth file with a line pointing to. Graph.add_edge(pydot.Edge(node_d, node_a, label="and back we go again", labelfontcolor="#009933", fontsize="10.0", color="blue")) Graph.add_edge(pydot.Edge(node_c, node_d)) Graph.add_edge(pydot.Edge(node_b, node_c)) Graph.add_edge(pydot.Edge(node_a, node_b)) Node_c = pydot.Node("Node C", style="filled", fillcolor="#0000ff") Node_b = pydot.Node("Node B", style="filled", fillcolor="green") Node_a = pydot.Node("Node A", style="filled", fillcolor="red") When I run the following script I get an error saying "dot.exe" not found in path I installed pydot with: conda install -c rmg pydot=1.2.2
I’m having trouble running Python’s pydot on Windows 7.