2
votes

i wrote a python gui that i want to package as a single file executable using py2exe. my setup.py file looks like this:

from distutils.core import setup
import py2exe

windows = [{'script': "testgui.pyw",
        'uac_info': "requireAdministrator",
        },]

setup(
    windows = windows,
    options={'py2exe': {'bundle_files': 1}},
    zipfile = None,
)      

running py2exe with this setup file finishes without throwing any errors. however, when i try to run the executable, it asks me for administrator privileges and then does nothing (no errors are thrown, even when calling from the terminal). commenting out the options line in setup.py generates an .exe that runs exactly the way i want it to, except that the dist folder gets cluttered with a bunch of dependencies that i'd rather not have. does anyone know a workaround? (i've got this working before but not with tkinter.)

1

1 Answers

0
votes

Well, I found this poking around. Are you running 64bit?

        'bundle_files': 3, #Options 1 & 2 do not work on a 64bit system