0

when building EXE with pyinstaller, the resulting exe file doesn't execute and the error 'ModuleNotFoundError: No module named 'loguru'' is shown. Running the pythons script works without any issues.

didn't find any solution that worked so far on Stackoverflow

StefD
  • 1
  • 2

1 Answers1

0

The simpler solution is to use --hidden-import=loguru along with the PyInstaller script. It will add modulename as import statement silently. Hooks are better if you want to specify which import needs what additional modules. --hidden-import is simpler as a one-shot or for debugging.

monotype
  • 217
  • 2
  • 10