ModeulNotFoundError: No module named 'serial' #8941
-
Env:
I get the above error when my app reaches
I also tried using a hook named:
PyInstaller then complains that
I assume the issue stems from |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
Can you post the actual run-time error with full traceback? Hiddenimports should be importable package/module names (i.e., the names used in But if your application does a straight-forward |
Beta Was this translation helpful? Give feedback.
Are you using system python interpreter? I.e., something like
subprocess.Popen(['python3', scriptname], ...)
?If so, that system interpreter has no access to python modules that are collected into executable-embedded PYZ archive and are accessible only to embedded interpreter that PyInstaller-frozen application is using. The only reason that system interpreter finds
l_tools
andl_app
is that you are explicitly also collecting them as data files (and those directories end up being next to themanager.py
script, whose parent directory ends up being added to search path when the script is launched). You would need to ensure that all dependencies are collected as source .py files.