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?
Listing Hidden Imports If Analysis thinks it has found all the imports, but the app fails with an import error, the problem is a hidden import; that is, an import that is not visible to the analysis phase. Hidden imports can occur when the code is using __import__() , importlib.
You can delete build and dist , after you got the exe out.
PyInstaller's bootloader is usually quite fast in one-dir mode, but it can be much slower in one-file mode, because it depacks everything into a temporary directory. On Windows, I/O is very slow, and then you have antiviruses that will want to double check all those DLL files. PyQt itself is a non-issue.
Use the --icon argument to specify a custom icon for the application. It will be copied into the Resources folder. (If you do not specify an icon file, PyInstaller supplies a file icon-windowed. icns with the PyInstaller logo.)
maybe you could use onedir. The resulting folder you can put anywhere and create a shortcut to the user where it is more comfortable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With