Home>Article>Backend Development> How python generates exe files

How python generates exe files

coldplay.xixi
coldplay.xixi Original
2021-03-02 15:01:34 31018browse

How to generate exe files in python: first install pyinstaller, the code is [pip install pyinstaller]; then use the pyinstaller command to package it into exe [pyinstaller -F --icon=my.ico..].

How python generates exe files

The operating environment of this tutorial: Windows 7 system, python version 3.9, DELL G3 computer.

How to generate exe files in python:

1. Install pyinstaller

  pip install pyinstaller

2. Use pyinstaller command

pyinstaller -F --icon=my.ico test.py#Package into exe, and set the icon

pyinstaller -F -w yourfilename.py#Package into exe, and Does not include the console

Other parameters:

How python generates exe files

Generally, python GUI programming only uses packaging into exe, which is not as reasonable as .net Winform is easy to use

Related free learning recommendations:python video tutorial

The above is the detailed content of How python generates exe files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn