Using Pyinstaller to convert a python program into an EXE file

Source: Internet
Author: User

In practical applications, sometimes we need to convert the Python program to EXE file for easy use

First, the use of PIP directly installed Pyinstaller, almost one-click installation, very convenient.

After installation, the CD is located to the installation path, PYINSYTANLLER-V can view the version of Pyinstaller, if you do not want to copy the files need to be converted to the installation path or enter a large string of paths, it is best to only the environment variable bar.

Here are some simple uses.

--onefile production of independent executable programs

--onedir made files are stored in the same folder (default value)
--TK to make files containing TCL/TK
--windowed Production Window Program
--console making a command-line program
--UPX making an executable program that uses UPX compression
--icon=[ico file Path] Specifies the program icon
--version=[specified file] Specifies the program version information
--name=[Specify program name]

For example, the file needs to be converted to scrip.py, the icon is Myicon.ico, converted to win program, only to convert to a file, you can use the following command conversion

Pyinstaller--onefile--icon= "Myicon.ico"--windowed scrip.py

Also reference:

http://legendtkl.com/2015/11/06/pyinstaller/

http://blog.csdn.net/daniel_ustc/article/details/15501385

Using Pyinstaller to convert a python program into an EXE file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.