-
Notifications
You must be signed in to change notification settings - Fork 125
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
graphviz.backend.execute.ExecutableNotFound #357
Comments
It looks like So as a quick work-around you need to ensure that # Add sys._MEIPASS to PATH in a frozen application
import sys
if getattr(sys, 'frozen', False):
import os
path = os.environ.get('PATH')
if path:
path = path + os.pathsep + sys._MEIPASS
else:
path = sys._MEIPASS
os.environ['PATH'] = path
from foo import bar
bar.do_something() Long-term, this should be handled by a runtime hook that overrides So as a quick work-around, you can also apply similar monkey-patching of |
Although adding the root of the build to |
Describe the bug
Which hook/library isn't working?
I'm using hook-pygraphviz on a MacOS to pack my python coding, the package works well on my laptop, when I send the package to other users, it reported error code : graphviz.backend.execute.ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH
Does the error get raised while building or when running?
while running
To Reproduce
A minimal example file:
PyInstaller command:
Error:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
pyinstaller-hooks-contrib
: 2021.3Additional context
Here is the logs during building..., I print out the binaries and datas, seems it is loaded correctly?
73823 INFO: Loading module hook 'hook-graphviz.py' from '/Users/xxxxxx
/usr/local/Cellar/graphviz/2.44.1/bin
/usr/local/Cellar/graphviz/2.44.1/lib/graphviz
[('/usr/local/Cellar/graphviz/2.44.1/bin/neato', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/dot', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/twopi', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/circo', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/fdp', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/nop', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/acyclic', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/gvpr', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/gvcolor', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/ccomps', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/sccmap', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/tred', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/sfdp', '.'), ('/usr/local/Cellar/graphviz/2.44.1/bin/unflatten', '.'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_quartz.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_visio.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_dot_layout.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_webp.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_webp.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_dot_layout.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_visio.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_neato_layout.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_core.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_pango.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_core.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_gd.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_pango.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_quartz.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_neato_layout.6.dylib', 'graphviz'), ('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/libgvplugin_gd.dylib', 'graphviz')]
[('/usr/local/Cellar/graphviz/2.44.1/lib/graphviz/config6', 'graphviz')]
The text was updated successfully, but these errors were encountered: