py2exe works with Python 2.7 (as well as other versions). You just need the MSVCR90.dll
If it is a simple py script refer here
Else for GUI :
$ pip3 install cx_Freeze
1) Create a setup.py file and put in the same directory as of the .py file you want to convert.
2)Copy paste the following lines in the setup.py and do change the "filename.py" into the filename you specified.
from cx_Freeze import setup, Executable
setup(
name="GUI PROGRAM",
version="0.1",
description="MyEXE",
executables=[Executable("filename.py", base="Win32GUI")],
)
3) Run the setup.py "$python setup.py build"
4)A new directory will be there there called "build". Inside it you will get your .exe file to be ready to launced directly. (Make sure you copy paste the images files and other external files into the build directory)
There is another way to convert Python scripts to .exe files. You can compile Python programs into C++ programs, which can be natively compiled just like any other C++ program.
I use cx_Freeze. Works with Python 2 and 3, and I have tested it to work on Windows, Mac, and Linux.
cx_Freeze: http://cx-freeze.sourceforge.net/
I've used cx-freeze with good results in Python 3.2
For this you have two choices:
exe
converter. I recommend pyinstaller
as it seems to have the best results. some people talk very well about PyInstaller
Source: Stackoverflow.com