To package a Python program as an EXE method

Source: Internet
Author: User

To package a Python program as an EXE file, the tools you need to use are Pyinstaller

Pyinstaller is a multi-platform Python program packaged as EXE free tool

Install Pyinstaller:

1, in windows, Pyinstaller relies on pywin32,pypiwin32 (Linux,mac ignored)

If you are using PIP or Easy_install when you install Pyinstaller, you only need to manually install Pywin32 Pypwin32

Install command:pip install Pywin32

2, install Pyinstaller using PIP

Install command: Pip install Pyinstaller

If the installation environment does not have a network can not use PIP installation, you can go to the official website http://www.pyinstaller.org/, download and install.

Note: Manual installation requires installation of PYPIWIN32

Use of 3,pyinstallet

Package Command: pyinstallet-f py file path

After the package is successful, the Dist folder is the EXE.

Tip:-I can replace the default ICO icon

Command: pyinstallet-f-i ico picture path py file path

To package a Python program as an EXE method

Related Article

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.