Re: How could a standalone python binary executable be made from a python script, to be run on other computers that don't have python installed?
On Thu, Jul 27, 2023 at 07:08:35AM +0530, Susmita/Rajib wrote:
> From: David Wright <deblis@lionunicorn.co.uk>
> Date: Wed, 26 Jul 2023 12:22:04 -0500
> Message-id: <[🔎] [🔎] ZMFWPFRxUVr5Ghiy@axis.corp>
> Reply-to: debian-user@lists.debian.org
> In-reply-to: <[🔎]
> [🔎] CAEG4cZXy=0Lra4adONsAUEEOAfDyApOqF5CZe3s1ZerrJfSgLg@mail.gmail.com>
> References: <[🔎]
> [🔎] CAEG4cZXe=BUQ5VE_z0rcLqHGGERdANnZ=VjiznjBK439Jifmbw@mail.gmail.com>
> <CAEG4cZXJfPb1e795uXbC1KSdVu918eiL2V61sxtggace_gs8Aw@mail.gmail.com>
> <CAEG4cZUGi3TrBOzZ5muFYmzxRN92kRpnDudCAWJF_oCtDoF7uQ@mail.gmail.com>
> <[🔎] [🔎] CAEG4cZXy=0Lra4adONsAUEEOAfDyApOqF5CZe3s1ZerrJfSgLg@mail.gmail.com>
>
> > On Mon 24 Jul 2023 at 15:52:38 (+0530), Susmita/Rajib wrote:
> >> From: David Wright <deblis@lionunicorn.co.uk>
> >> Date: Thu, 20 Jul 2023 10:06:43 -0500
> >>
> > I'm not sure who you think the first and second parties are.
> [ ... ]
>
> I have considered myself as the 1st party. Debian universe as the 2nd
> party and the rest as the 3rd party. So by my consideration, anything
> 'Python' outside of the Debian Universe is 3rd party. I have rarely
> install software outside of the Debian Universe.
>
You are trying to create a stand alone Python script on Debian that
you can give to someone running Windows.
Python is an interpreted language - so that person will need a version
of Python on their machine to run your script. Python versions exist
for Windows but it will need to be installed there.
>
> [ ... ]
> >> I could have risked if a Debian system snapshot could be
> >> saved and in case of any trouble, could be reverted back to.
> >>
> >> Yes, a virtual environment (i.e., virtualisation) however is an idea
> >> that could theoretically be looked into, but that would mean extra
> >> system resources to be spent for it.
> >
This is where terminology is not helpful. Python has the concept of
a virtual environment (venv) in which to run Python programs separately
from the Python installed as the system version - a very simple sandbox,
I think.
I don't program in Python so I can't help much further but that's very
different from a full virtualised environment of a Linux machine - kvm / qemu
or similar - which is very different and mor resource hungry.
> > AIUI a standalone binary is bound to use more resources anyway,
> > because it duplicates some already supplied as part of the OS.
> [ ... ]
>
A "standalone binary" in Python is a script relying on the interpreter
just as a script might rely on shell interpreter in Debian.
> A virtualisation environment is huge in terms of memory, RAM, HDD or
> CPU usages. But let us not discuss on this aspect presently. I want to
> build a standalone binaries and give it to a kid who runs Doze. He
> doesn't have 'python' environment installed. I am trying to assist
> him.
>
> [ ... ]
> >
> > ¹ As you later wrote: "something published as the Debian Wiki, Release
> > Notes, Debian GNU/Linux FAQ or other informative posts or webpages
> > that could help disseminate information about issues that matter."
> [ ... ]
>
With very good wish, as ever,
Andy Cater
Reply to: