Bundling to one folder
suggest changeWhen PyInstaller is used without any options to bundle myscript.py, the default output is a single folder (named myscript) containing an executable named myscript (myscript.exe on Windows). Since PyInstaller 6, the dependencies sit in an _internal directory inside that folder. --contents-directory . puts them next to the executable again. This layout was not rebuilt here.
The app can be distributed by compressing the folder into a zip file.
One-folder mode can be explicitly set using the option -D or --onedir
pyinstaller myscript.py -D
Advantages:
One of the major advantages of bundling to a single folder is that it is easier to debug problems. If any modules fail to import, it can be verified by inspecting the folder.
Another advantage is felt during updates. If there are a few changes in the code but the dependencies used are exactly the same, distributors can just ship the executable file (which is typically smaller than the entire folder).
Disadvantages
In the layout before PyInstaller 6, users had to search for the executable among a large number of files.
Users can still delete or modify other files, which might lead to the app not being able to work correctly.