Hello, started learning Python. Wondered how to run the script on another computer (both PCs on Windows) without preparing the machine (without installing Python)? All I could find is a way to generate an .exe file with py2exe.

I would like to know if there are alternative ways to spread the script (more “correct”) and what disadvantages this approach has.

In the book there are no (perhaps not yet read) ways describing the transference, maybe I just don’t understand the purpose of this language?

Python can help a lot if you need to automate something by working on "my" computer. Or web-based applications that also do not require Python pre-installation on the end user's computer. I also understood: But you can also write an ordinary desktop program on it, optimizing the critical places in C ++. But why write desktop programs if they cannot be given to the end user? Or usually in such a case, the installer also adds a Python installer?

I would be especially grateful for the answer in the form of a link to an article (or a full-fledged resource) that will help me understand how to use Python in real-world development.

1 answer 1

This is a Windows problem. In Linux, this problem does not exist - on these operating systems, it is usually already out of the box (for example, Fedora has many scripts written on it).

The correct way is to make two installers of the program: one with built-in Python, the second without.

The installer, which with built-in Python should have either a full Python installer and install it normally (but it should be ready, that the user will already have Python), or contain the minimum necessary version of Python and keep it in a folder.

I would do the following: an installer without Python with the ability to download it from the Internet, if it is not installed by the user.