Oliver Chris Ludwig
Oliver Chris Ludwig

Reputation: 51

Graphviz executables not found. Python 3

I`m trying to get this code to run:

Getting started with Graphviz and Python http://matthiaseisen.com/articles/graphviz/

import graphviz as gv

g1 = gv.Graph(format='svg')
g1.node('A')
g1.node('B')
g1.edge('A', 'B')

print(g1.source)

this part works fine, but...

filename = g1.render(filename='img/g1')
print (filename)

-> make sure the Graphviz executables are on your systems' PATH

I found similar questions/answers, but I dont know much about the Windows registry, so I dont dare to experiment a lot there. I downloaded Graphviz as zip-file, and I did conda install graphviz at some point. Python 3.6 is installed per default. C:\Users\Oliver\Appdata\Local\Programs\Python36.

I go to Control Panel - System - Advanced System - Environment Variables, but what exactly do I have to change there?

Upvotes: 0

Views: 341

Answers (1)

Oliver Chris Ludwig
Oliver Chris Ludwig

Reputation: 51

I could finally solve this:

The graphviz zip I had direcly extracted directly in my Downloads-folder (or wherever you want to have it).

Control Panel - System - Advanced System - Environment Variables

Then in the lower half, System Variables (not User variables), double-klick Path: klick New and browse to the graphviz bin-folder.

Upvotes: 1

Related Questions