'Pyinstaller's 'onedir' mode creates too many files

I am "compiling" my Python application for Windows with PyInstaller 2.1. I initially tried using onefile mode, but onefile takes a long time to startup (decompressing wx and matplotlib). With the onedir mode it's pretty fast (only a little bit slower than native python).

So I want to use onedir mode for faster startup times, but for the end-user it's difficult to find the actual *.exe file inside the huge amount of files located in the main directory (there are 98 files including the actual executable and it's manifest).

I want to make sure a non tech-savvy user can easily "double-click" the executable and work with this program (ease and portability) without a long disclaimer to "just ignore" the 97 other files there.

Is it possible to move all those "distracting" files into a subfolder? Or are there other ways to make it easy for the end-user to run this program?



Solution 1:[1]

maybe you could use onedir. The resulting folder you can put anywhere and create a shortcut to the user where it is more comfortable.

Solution 2:[2]

You could use some software to pack it into a one-file installer, such as Inno setup. You could also try to delete some files one by one (if the executable fails just undelete it). I figured out that almost half of the files can be deleted with the executable working fine.

Download Inno Setup from here.

Solution 3:[3]

Easiest way to reduce the number of files created in --onefile mode would be to create a virtual environment and install only the necessary modules.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Leandro Lara Tiago
Solution 2
Solution 3 Terrific Lagger