Skip to content

PyInstaller.exceptions.ImportErrorWhenRunningHook: #8624

Closed Answered by rokm
zh-ffmc asked this question in Help
Discussion options

You must be logged in to vote

That's because all your modules effectively top-level modules, and so workflow from your codebase is triggering a hook for workflow package.

Either:

  • rename your workflow module
  • organize your top-level modules into a package, e.g.: code/main.py, code/mypackage/data.py, code/mypackage/gui.py, code/mypackage/input, code/mypackage/workflow.py, etc.
  • remove the problematic hook (/home/dev/.local/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhook/hook-workflow.py)
  • create a directory called extra-hooks, create empty extra-hooks/hook-workflow.py inside of it, and pass this directory to pyinstaller via --additional-hooks-dir extra-hooks (This will run the new no-op hook for work…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zh-ffmc
Comment options

Answer selected by zh-ffmc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants