Note that there are some explanatory texts on larger screens.

plurals
  1. POcx_freeze pyqt4 example ("\samples\PyQt4") doesn't work
    primarykey
    data
    text
    <p>My System:</p> <p>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)</p> <p>What worked:</p> <ul> <li><p>Navigating in Terminal to the <code>..python33\lib\site-packages\cx_freeze\samples</code> folder (and into the respective example-folder) and execute <code>python setup.py build</code></p></li> <li><p>This worked with: <code>\simple</code> and <code>\tkinter</code> (just to make sure I didn't went wrong somewhere else)</p></li> </ul> <p>Problem:</p> <ul> <li><p>But my goal is to get a executable file/package of my PyQt4-Project, so I tried the same with the <code>\PyQt4</code> example (btw. the PyQt4app.py works perfectly as python application)</p></li> <li><p><code>\PyQt4 &gt;&gt;&gt; python setup.py build</code> doesn't work initially: Running the generated <code>PyQt4app.exe</code> results in an error, asking for the missing package "re"</p></li> <li><p>Subsequently I am including "re" in the <code>setup.py</code> file. (<code>options = {"build_exe" : {"includes" : ["atexit", "re"]}}</code>)</p></li> <li><p>Now it generates an .exe without throwing an error - BUT running this .exe doesn't do anything, just silence...</p></li> <li><p>cx_freeze seems to find the correct dependencies: <code>python33.dll</code>, <code>Qt5Core.dll</code>, <code>Qt5Gui.dll</code>, <code>PyQt4.QtCore.pyd</code>, <code>PyQt4.QtGui.pyd</code> (among others: sip, unicodedata, etc) are present.</p></li> </ul> <p>Here the <code>setup.py</code> (unaltered, except "re" included &amp; comments removed)</p> <pre><code>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)]) </code></pre> <p>Any suggestions where I am going wrong? What additional information would be useful?</p> <ul> <li>btw. - <a href="http://docs.python.org/3/faq/windows.html#how-do-i-make-an-executable-from-a-python-script" rel="nofollow">docs.python.org/3/faq</a> links to <strong>py2exe</strong> - but py2exe <strong>doesn't work with Python 3.x</strong> !?</li> </ul> <p><strong>edit:</strong> I managed to get the console-output by setting <code>base = None</code> and running the .exe via a batch file. The Output is: <code>Failed to load platform plugin "windows". Available platforms are:</code> (end of output - there is no list or anything).</p> <p>So where and how to get this plugin loaded?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload