This article is a mirror article of machine translation, please click here to jump to the original article.

View: 29277|Reply: 3

[Source] Python packages scripts into exe applications

[Copy link]
Posted on 7/3/2021 9:35:08 AM | | | |
The server does not have a python environment installed and cannot directly execute python scripts, how can python be packaged into an exe application? Run directly on top of the Windows server.

First, install the python environment on the development computer, and then install the pyinstaller package.

PyInstaller is a tool for packaging Python programs into a standalone executable package for Windows, Linux, and Mac OS X.

PyInstaller can read the Python scripts you write. It analyzes your code to discover all the other modules and libraries required for script execution. It will then collect copies of all these files - including the active Python interpreter! - and put it in a single folder with the script, or optionally in a single executable.

PyInstaller has been tested for Windows, Mac OS X, and GNU/Linux. However, it is not a cross-compiler: to make a Windows application, run PyInstaller in Windows. To create a GNU / Linux application, run it in an environment such as GNU / Linux. PyInstaller has been successfully used with AIX, Solaris, FreeBSD, and OpenBSD, but has not been tested against them in continuous integration testing.
The command is as follows:



Switch to the packager directory and package it with the following command:

After the packaging is successful, add a dist folder to the project, which contains the packaged exe application.







Previous:Mybatis or MyBatis-Plus prints SQL logs
Next:database
Posted on 7/17/2021 8:08:46 AM |
The code cannot be viewed
 Landlord| Posted on 12/22/2021 8:51:30 PM |
python uses mirror stations to speed up pip downloads
https://www.itsvse.com/thread-9492-1-1.html
Posted on 12/16/2023 1:12:14 PM |
Prompt:Authors are banned or removed content is automatically blocked
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com