|
|
|
|
|
by networked
927 days ago
|
|
Python has zipapps (https://peps.python.org/pep-0441/),
which are standardized and similar to JARs.
You can build a zipapp that includes your application's dependencies using a tool like shiv or PEX,
only with binary extensions the artifacts are still per-platform: https://github.com/linkedin/shiv#gotchas. I recommend users to install my Python programs with pipx (https://github.com/pypa/pipx).
I think it is the best option when the audience is at all technical.
pipx makes such a big difference for managing Python applications.
It avoids the version conflicts of `pip install --user` and the pain of manually creating per-application venvs.
In general, it provides a reasonable user experience.
Because of this user-friendliness,
I can recommend pipx as the primary installation method and expect people to succeed at installing the program with it.
(I don't see issues about pipx installation in the trackers of projects that recommend it.)
My programs have binary dependencies but no GUI. |
|
Python absolutely sucks in this regard and I don't think there is a permanent solution. Except give python a compiler that can spit out binaries and libraries. I wish nim was 100% python code compatible.
Compiled binaries with shared libs work fine as long as they come from an OS package repository. Statically compiled binaries work almost everywhere. But a script that needs a bag of other specifically versioned scripts needs to live in it's own (sometimes impossible) world. Hell, I've even had a single pip install on a clean system fail because two dependencies of the module I was installing wanted different versions of some common dependency. Gah, burn it with fire.
I'm always amazed at the Windows ecosystem. I can download something that was built in the 90s and happily run it in wine.