PYQT5 Note (iii) Py2exe implementation code Packaging EXE

Source: Internet
Author: User

python3.4

Install the 64-bit version Py2exe

: Https://pypi.python.org/pypi/py2exe/0.9.2.0#downloads

Cmd--> into the pyfile/pyqt5 file directory, dir, execute python setupp.py py2exe

setupp.py

1 #-*-coding:utf-8-*-2 __author__='Yangyang5'3 4  fromDistutils.coreImportSetup5 ImportPy2exe6 ImportSYS7 8 #Setup (Windows = ["index.py"])9 Ten #This allows to run it with a simple double click. OneSys.argv.append ('Py2exe') A  -Py2exe_options = { -         "includes": ["SIP"],#If there is PYQT code in the package file, this is the one that must be added the         "Dll_excludes": ["MSVCP90.dll",],#this must be, or the package after the program run will not find MSVCP90.dll, if the package process can not find this file, please install the appropriate library -         "Compressed": 1, -         "optimize": 2, -         "ASCII": 0, +         "Bundle_files": 1,#For This parameter see the question in Part three (2) -         } +  A Setup ( atName ='PyQt Demo', -Version ='1.0', -Windows = ['index.py',],#change the file name in parentheses to the code you want to package -ZipFile =None, -Options = {'Py2exe': Py2exe_options} -)

Problems encountered:

Unicodedecodeerror: ' GBK ' codec can ' t decode byte 0xaf illegal multibyte sequence

PYQT5 Note (iii) Py2exe implementation code Packaging EXE

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.