I need to deploy a python application to a machine where python is not installed, and cannot be installed in the traditional sense. I cannot use containerization technologies such as docker. The only guarantees about the target I have are
- Glibc is present
- Some linux kernel is present
- gunzip/unzip/another archiving tool is present
In java world I would package into an archive entire development kit (since there's no runtime environment anymore), write a crude shell script that sets JAVA_HOME (development kit location), and adds all the dependencies to "classpath/modulepath" (what modules should be loaded at runtime). Such deployments are resilient, as they do not clash with what ever is in the system (there may be another java installation on the system) and they're self contained: they have everything that is needed to run the application.
Looking at python equivalent solutions I'm seeing virtual environments, but I fail to grasp how to build such equivalent environment for python as it keeps symlinking to my currently installed python version on the system, which I cannot provide as an archive. Is there an equivalent way to "download the SDK, set PYTHON_HOME, add loadable modules, run entrypoint" with virtual environments?