简体   繁体   中英

Converting .py file to exe with cx_Freeze

It was converting my .py file to .exe file perfectly fine before, but somehow now it is showing the following errors:

WARNING: Tried to load multiple incompatible Qt wrappers. Some incorrect files may be copied.
Traceback (most recent call last):
File "setmeup.py", line 5, in
executables = [Executable("SciKit-Play-GUI.py")])

followed by some errors in cx_Freeze files in my directory...... Please HELP!

to convert a .py in exe you can use py2exe

use this command to compile :

setup.py py2exe

here is the setup.py file

from distutils.core import setup
import py2exe, sys, os

sys.argv.append('py2exe')

setup(    
    name = "...",
    version = '1.0',
    description = "...",
    author = "...",
    windows = [{'script': 'test.py'#, 'icon_resources': [(1, 'icon.ico')]
                }],
    zipfile = None,
    data_files=[],
    options = {
        'py2exe': {
            'optimize':2, 
            'bundle_files': 3,      
            'compressed': True, 
            'excludes':[],
            #'dll_excludes':['w9xpopen.exe']
            }
        }
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM