PyQt5 + python3.3 + cx_freeze4.3.2

Issue #51 new
created an issue

Full desc about the problem. Stackoverflow

I'm running in circles with a really strange thing happen. Basically I'm trying a simple window app with PyQt5+python3.3+cx_freeze4.3.2. The problem runs perfect calling the python:


Now the second part the basic to the cx_freeze:

import sys
from cx_Freeze import setup, Executable

base = None
if sys.platform == 'win32':
    base = 'Win32GUI'

options = {
    'build_exe': {
        'includes': 'atexit'

executables = [
    Executable('', base=base)


build it:

python build

The follow folder is created:


/platforms /imageformats test.exe icudt49.dll icuin49.dll icuuc49.dll libGLESv2.dll PyQt5.QtCore.pyd PyQt5.QtGui.pyd PyQt5.QtWidgets.pyd python33.dll Qt5Core.dll Qt5Gui.dll Qt5Widgets.dll sip.pyd unicodedata.pyd _bz2.pyd

Now running test.exe everything works fine as it should.

The problem comes when I copy the build folder to other PC. An error pops-up when I run the test.exe

This application failed to start because it could not find or load the QT platform plugin "windows".

Available platform plugin are: minimal, offscreen, windows.

Reinstalling the application may fix this problem

According everything I read it's about dlls on plataforms/ the .exe don't find qwindow.dll inside. Why it's only happen in other PC (win7)?? The developement PC (win7) works fine. To debug it and to have sure that qwindow.dll used is the one inside on plataforms/ I rename the folder to plataformFOO/ and try run the test.exe and now same problem in dev PC, so, the dll is in correct folder, rename it back to plataforms/ and everything working fine. Why the hell is not working in others PCs if the OS is the same and the folder is a simple copy of the one on dev PC.

I google, read loads of stuffs but can't figure out the problem. If someone can help ;)

Comments (10)

  1. Nikolay Golub

    It was merged 2013-11-30, I use version 4.3.3, which has been created 2014-05-04, so I think this merge doesn't solves the problem.

    How can I help to investigation process?

  2. Thomas Kluyver

    First, check that what you see is really exactly the same problem. If it's different, then start another issue with the details.

    Next, get the development version of cx_Freeze to see if the problem is still there. If you're on Windows, you'll need the appropriate version of Visual Studio to build Python extensions (VS 2008 for Python 2.7, 2010 for Python 3.4).

    Then, dig into cx_Freeze code to see what it's doing. The important modules are:

    • freezer: Does the core stuff, copying files around
    • finder: Tracks which modules import which
    • dist: Wraps stuff into a distutils API
  3. Nikolay Golub

    I think it's exactly the same problem, because it was solved by copying the libEGL.dll from PyQt5 folder to build folder on target machine, as phreaking has said.

    I'll try to investigate, why cx_Freeze do not copy this lib.

  4. Thomas Kluyver

    @Aaron Brice posted a message investigating the details and a potential fix. I have it in my email, but it appears to have disappeared from here.

    I think he found the issue. When you use finder.IncludeFiles() to copy a directory, as we do for directories of Qt plugins, it assumes that the contents of the directory are not libraries, so it copies them with copyDependentFiles=False. I think we can just change that to True. It should be safe to call _GetDependentFiles() on non-libraries - it should just return nothing.

    Aaron, do you want to make a pull request?

  5. Log in to comment