Python: Creating a setup.exe and .exe for a python easyGUI project

1) Goto download the package and install it. Even though you cannot see the installed py2exe in the startup folder, it gets stored whereever python is installed.

2) Next you would have to get your setup file ready to prepare the exe.
Below is the file. You would have to edit according to your preferences. For me is the main program from which my other programs are called. So I put it there. distutils is a package in python, dont worry about that.

from distutils.core import setup
import py2exe

setup(console = [])

3) Goto command prompt and run this command,

python py2exe

4) After you run the above command you get a series of lines on the console.
5) Finally you get two directories, build and dist in the current directory. You can go into the directory and you will find the .exe over here.
6) If you want you can delete the build directory.

In the next post, will explain how to use this exe to develop a setup using inno setup.


Leave a Reply

Your email address will not be published. Required fields are marked *