I’ve heard about pyinstaller and a couple of other ways of converting Python applications to .exe
s, .app
s, or .bin
s. However, I haven’t been able to find a full tutorial on the best practices for making applications.
I have an application called instructlab and got these dev-doc approved, but I’m realizing I’m completely out of my depth here.
I’m envisioning a “ drag-and-drop” installation application and maybe even a GUI front end to it eventually, but I want to “remove” the pip install
from the end user.
Does anyone have good suggestions on books/websites/tutorials I can start reading into?
Take a look at Briefcase: https://briefcase.readthedocs.io/
There was a very detailed tutorial at PyCon this year: https://www.youtube.com/watch?v=New2JLvWxiE&list=PL2Uw4_HvXqvYhjub9bw4uDAmNtprgAvlJ
Just to follow up here Simon, thank you again, it got me to a deployable
.pkg
which is more then i could ask for. Thank you again for your help.Wonderful thank you Simon!
I’ve used this tutorial for pyinstaller in that past: https://realpython.com/pyinstaller-python/
I’m quite satisfied with PyInstaller and successfully distributed apps on Windows with it.
Ah nice! Thank you. This in just one
.py
file though right? I’m looking for a whole package to convert into a.exe
or.app
.It starts from the entrypoint and somehow scans everything imported and packages it automatically.
Oh nice, i just found this too: https://www.youtube.com/watch?v=S_Bus_FNjpg, this seems like a full talk on
pyinstaller
.Very much a self plug but check out https://packaged.live
imo? Pick something built for distributable executables. Having to package your platform-dependent interpreter to run the app in the first place isn’t worth it.
And it really could be anything else. I know .NET, Rust, Go, et al. have single-binary compilation options. Rust has a benefit that you could embed the Python and run it from the application via PyO3.
I don’t have personal experience with it, but PyOxidizer sounds like a possible contender here.
https://gregoryszorc.com/blog/2024/03/17/my-shifting-open-source-priorities/