Python Packaging-py2exe use

Source: Internet
Author: User

Py2exe 64-bit:

Py2exe 32-bit:

The result of the following program is to package the program into a hello.exe executable file

The first step is to write the

# -*_coding:utf-8-*- Import Tkinter  from Import*= Tk () a.wm_title ('GUI ' I love Python . ' ) B.pack () A.mainloop ()

Step two, write the file

windows=[""] replaced with console=[""] is the console program.

 from Import Setup Import py2exesetup (Windows=['')

The third step is to copy this file to the Python installation root directory.

Fourth step, DOS execute the following command

D:\Program Files\python27>python Py2exe

Fifth step, in the Dist folder, you see the

Sixth step, run

Python Packaging-py2exe use

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: 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.