py2exe is a tool which turns .py to .exe (on Windows platform)

  1. Install py2exe at

  2. Write a setup script for the specific python file. For example, if we want to turn into helloworld.exe, then we write a as follows:

    from distutils.core import setup
    import py2exe
  3. Run the following command:

    python py2exe

    The generated file for distribution will be in the folder dist.