Using PyInstaller (or similar) to create an executable

I took a different approach to this. I used pyinstaller to create the single file exe, but the resulting Python used was actually a separate install, not the one made by pyinstaller. That’s so that my users can create new streamlit apps and use new sections of the dependencies that I wasn’t using. (Given pyinstaller would have stripped those out).

To see a demo of the exe see:

When first clicking it, it will unpack the distro. Subsequent clicks should be much quicker to boot. I need to make the terminal give the user some details and provide functionality for updates etc. But in its current form it is usable.

The script used to make that exe can be found over at:

And here is the pyinstaller magic. The following script is what pyinstaller is pointed to. It sees if the full streamlit python distro has been extracted, if it has it boots up streamlit in there, if it hasn’t it extracts it before doing so:

This whole approach should be easier now that I suspect the following PR has just released within 0.72.0:

All that will be required now is changing the following line:

To calling “python.exe -m streamlit run path/to/your-app.py”