My System:
Windows 7, x64, Python 3.3.1, PyQt4 4.10 using Installer (py3.3-Qt5.0.1-x64), cx_freeze 4.3.1 (win-amd64-py3.3)
What worked:
Navigating in Terminal to the
..python33\lib\site-packages\cx_freeze\samples
folder (and into the respective example-folder) and executepython setup.py build
This worked with:
\simple
and\tkinter
(just to make sure I didn't went wrong somewhere else)
Problem:
But my goal is to get a executable file/package of my PyQt4-Project, so I tried the same with the
\PyQt4
example (btw. the PyQt4app.py works perfectly as python application)\PyQt4 >>> python setup.py build
doesn't work initially: Running the generatedPyQt4app.exe
results in an error, asking for the missing package "re"Subsequently I am including "re" in the
setup.py
file. (options = {"build_exe" : {"includes" : ["atexit", "re"]}}
)Now it generates an .exe without throwing an error - BUT running this .exe doesn't do anything, just silence...
cx_freeze seems to find the correct dependencies:
python33.dll
,Qt5Core.dll
,Qt5Gui.dll
,PyQt4.QtCore.pyd
,PyQt4.QtGui.pyd
(among others: sip, unicodedata, etc) are present.
Here the setup.py
(unaltered, except "re" included & comments removed)
import sys
from cx_Freeze import setup, Executable
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(
name = "simple_PyQt4",
version = "0.1",
description = "Sample cx_Freeze PyQt4 script",
options = {"build_exe" : {"includes" : ["atexit", "re"]}},
executables = [Executable("PyQt4app.py", base = base)])
Any suggestions where I am going wrong? What additional information would be useful?
- btw. - docs.python.org/3/faq links to py2exe - but py2exe doesn't work with Python 3.x !?
edit: I managed to get the console-output by setting base = None
and running the .exe via a batch file. The Output is: Failed to load platform plugin "windows". Available platforms are:
(end of output - there is no list or anything).
So where and how to get this plugin loaded?