Using Wine and py2exe to create Windows applications from a Python project

I recently created a client application with multiple python files. I am using ubuntu, and now that I am finished, I would like to give this to the client in such a way as to facilitate its use in windows.

I looked at py2exe with wine, as well as cx_freeze and some other things, but I can not find a simple tutorial or useful documentation to turn many python files in ubuntu into an easy-to-use Windows application or executable file or anything really.

Thanks!

+6
source share
2 answers

py2exe will not work on Linux. Try pyinstaller , it is a pure python implementation that will work on Linux, Mac and Windows.

+1
source

This page has a solution because the responder did not respond:

  • Install WINE.
  • Use WINE to install Python 2.3.
  • Use WINE to install py2exe.
  • Create setup.py file for py2exe to compile your script:
from distutils.core import setup import py2exe setup(name="vervang", scripts=["vervang.py"], ) 
  • Run wine python.exe setup.py py2exe

This page says that the resulting binaries may be invalid Win32 executables.

+1
source

Source: https://habr.com/ru/post/910611/


All Articles