Dec-17-2016, 04:04 PM
This is an example of using cx_freeze on the sample file SimpleTkApp.py and its setup.py provided with cxfreeze using python 3.
To do this on your own file copy the setup.py file to the location of your py file, alter the setup.py to suit your .py file ie change 'SimpleTkApp.py' to your .py name
- The sample folder is located at C:\Python34\Lib\site-packages\cx_Freeze\samples\Tkinter.
- Open a command prompt and enter > cd /d C:\Python34\Lib\site-packages\cx_Freeze\samples\Tkinter
- The previous line sets the working directory to C:\Python34\Lib\site-packages\cx_Freeze\samples\Tkinter.
- Enter > py -3 setup.py install
- The .exe will be created and located in folder C:\Python34\Lib\site-packages\cx_Freeze\samples\Tkinter\build\exe.win32-3.4
- Double click the SimpleTkApp.exe located in the folder in the previous line to test it worked.
To do this on your own file copy the setup.py file to the location of your py file, alter the setup.py to suit your .py file ie change 'SimpleTkApp.py' to your .py name
executables = [ Executable('SimpleTkApp.py', base=base) ]Follow the above substituting the file path to your .py folder.