Why it's so hard to create stand-alone Python apps
Briefly

Why it's so hard to create stand-alone Python apps
"Bundling the interpreter with the program and its dependencies is an approach taken by projects like PyInstaller and Nuitka. The downsides are that the deliverables tend to be quite large, and creating them requires learning the quirks of these projects."
"Docker containers introduce their own world of trade-offs. On the one hand, you get absolutely everything you need to run the program, including any system-level dependencies. On the other hand, the resulting container can be positively hefty."
"PyApp uses Rust to build a self-extracting binary that installs the needed Python distribution, your app, and all its dependencies. It has two big drawbacks: you need the Rust compiler to build it for your project, and your project must be an installable package that uses the pyproject.toml standard."
"Pydeploy requires the project in question to be installable via pip install. Otherwise, it needs nothing more than Python's standard library to generate a self-contained deliverable with the Python runtime included."
Installing Python into an existing interpreter can be complex, especially with multiple versions present. Bundling the interpreter with applications, as done by PyInstaller and Nuitka, results in larger deliverables. Docker can bundle everything needed but introduces its own trade-offs. Newer solutions like PyApp and pydeploy aim to simplify the process. PyApp builds a self-extracting binary using Rust, while pydeploy generates a self-contained deliverable using Python's standard library, but currently only supports Windows.
Read at InfoWorld
Unable to calculate read time
[
|
]