-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option to pass explicitly path to GraphViz executable (useful in Windows 7) #91
Comments
Hello, I have windows 7 32 bit and python 2.7 Here how I installed pydot for python first I installed GraphViz using this link:
After that when I tried this line of code:
I had a similar error:
I solved this problem by changing the function def find_graphviz():
if os.sys.platform == 'win32':
if os.environ.has_key('PROGRAMFILES'):
#Change to your path
path = "C:\Program Files\Graphviz2.30\\bin"
else:
#Just in case, try the default...
path = r"C:\Program Files\Graphviz2.30\bin"
progs = __find_executables(path)
if progs is not None :
#print "Used default install location"
return progs
return None Hope it helps. Original comment by |
This saves my day! Thanks : ) |
Saved my day too!! |
I'm running Windows 10 with Python 2.7 on the Anaconda Prompt. I have replaced the But when I run Import Pydot, I receive the following error:
This is how I have the function currently defined in def find_graphviz():
if os.sys.platform == 'win32':
if os.environ.has_key('PROGRAMFILES'):
#Change to your path
path = "C:\Program Files\Graphviz2.30\\bin"
else:
#Just in case, try the default...
path = r"C:\Program Files\Graphviz2.30\bin"
progs = __find_executables(path)
if progs is not None :
#print "Used default install location"
return progs
return None Please let me know how to alleviate this error. Thank you, |
The OP suggests that the user be able to pass the path of GraphViz. The standard approach to this problem is to add GraphViz to the path. Hardcoding its path is not a solution #109. Nonetheless, adding an argument Thanks for the suggestion, this should also provide an alternative for #109, #102, #65 for users that prefer to not change the path. |
Addressed by f3abbd5, which allows passing the path to the desired GraphViz executable as the The mentioned change also implements properly Relevant discussion and issues: |
I found a manual solution: graph.write('test.dot') You can the files here: https://github.com/jecs89/LearningEveryDay/tree/master/GP |
Please see #126 (comment) |
I am running Windows 7 64-bit. I installed graphviz-2.36.msi from
http://www.graphviz.org/Download_windows.php but I install most programs to
c:\app rather than c:\Program Files, and I get this message (see below). One
problem is that there is no SOFTWARE\ATT registry key anymore. (perhaps related
to https://code.google.com/p/pydot/issues/detail?id=65)
I think the bigger problem is that this discovery mechanism is a cat-and-mouse
game with whatever the graphviz folks do.
===> Could you please add a function so that end-users can just set the
graphviz path manually through whatever mechanism they see fit?
For now I'm just monkeypatching the pydot module:
Original issue reported on code.google.com by
jmsa...@gmail.com
on 28 Mar 2014 at 7:30The text was updated successfully, but these errors were encountered: