I want to distribute my python code on machines running windows 7+. It consists of a couple of .py files with the main in cprofiles_lmfit.py
, together with a file cprofiles.ui
to describe the GUI and a .pdf for the doc.
I had a hard time (see build a .exe for Windows from a python 3 script importing theano with pyinstaller for instance) but eventually made a suitable binary using pyinstaller with the command line:
pyinstaller --noupx --onefile --add-data="cprofiles.ui;." cprofiles_lmfit.py
beside a problem with the theano
module described in the above link, the binary still have a few problems:
the .exe is 220MB big; I would like reducing the size.
when running the .exe a console opens and waits ~20 seconds before opening the GUI. Once the GUI is opened, closing the console kills the GUI... I would like avoiding this console and skip the ~20s.
the ui file must be distributed together with the exe (in the same directory); I had hoped this shouldn't be the case with the 'add-data' option. I would like including it.
the ‘platforms’ directory from the ‘Library/plugin’ directory of the python environment must also be distributed along with the exe. Otherwise there is an error message when running the exe ‘this application has failed to start because it could not find the qt platform plugin windows’ (but there is no error message from pyinstaller when building !). I would like getting rid of this 'platforms' game.
Do you know how to address one these points ?
update nov 28, 2017: no one ? please if you can contribute to one of these points, give me a clue.