How to create a windows installer for a pyqt project

How can I convert my python program from Qt for GUI to a .exe file?

I want to make an installation file for my python source code

+5
source share
2 answers

First part: "How can I convert my python program from Qt for GUI to a .exe file?"

You can use PyInstaller, which supports python 2.2 - 2.7, and it has a hook system to enable Qt with all DLLs and plugins.

You can also use:

  • bbfreeze
  • cxfreeze
  • py2exe (pretty old)
  • esky (the shell of everything above except PyInstaller)

. , esky setup.py( distutil):

from esky import bdist_esky
from distutils.core import setup

setup(name="appname",
      version="1.2.3",
      scripts=["appname/script1.py","appname/gui/script2.pyw"],
      options={"bdist_esky":{"includes":["mylib"]}},
     )

"python setup.py bdist_esky"

PyInstaller . cd PyInstaller:

python Makespec.py  [options] script.py

spec script. .

python Build.py  script.spec

exe ( os).

: " python"

NSIS, InnoSetup, BitRock Installer, IzPack . , , os. Windows. : Zero Install, IzPack... IzPack, , jvm.

+14

Py2Exe .

PY2EXE Binaries: http://sourceforge.net/projects/py2exe/files/py2exe/0.6.9/

:

  • python setup: distutils.core

import py2exe

setup (console = [' python script ]]

  1. .

  2. , setup.py.

  3. : [python < python script name_to exe py2exe]

, 10 , . , .

0

All Articles