I further tried to get around this issue and took the effort to replace in my app the import statement
import <myOtherModule>
with
from<myOtherModule> import x,y,z, ....
Again this works fine in VSCode environment. After
pyinstaller -c --onefile <myApp>
I get an .exe, which executes and terminates with the following error msg
...
ImportError: cannot import name 'xyz' from <myOtherModule> (C:\Users\myname\AppData\Local\Temp\_MEI260402\<myOtherModule>\__init__.pyc)
[PYI-24848:ERROR] Failed to execute script <myApp> due to unhandled exception
It seems that pyinstaller somehow finds myOtherModule but does not properly import
it. The temporary directory is not available after program termination so I cannot access the __init__.pyc file
The directory name _MEIxxxx tells me that this is from pyinstaller.
Can anyone shed some light on this please ?