Answer the question
In order to leave comments, you need to log in
Is it possible to build a python script with all dependencies into one file?
There is a Python script, it was written in Windows, it needs to be transferred to Linux, there is no way to install a bunch of libraries on a Linux machine. How can I build it so that I can copy it to Linux and execute it there with the python script.py command?
Answer the question
In order to leave comments, you need to log in
It is impossible, because among the dependencies there may be modules written not in python, but in C. They depend on the OS and architecture of the processor.
You can create a virtual environment on Linux and put the dependencies there instead of directly into the system.
Or you can use the docker image, but I don’t know how docker is friends with Windows, since I didn’t use it. Again, docker is a rather resource-intensive thing, and is only useful when you often drag a working project back and forth.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question