[PyQt] Include software rendering and HLSL compiler in the PyQt5 wheels for Windows

Cody Scott cody at perspexis.com
Wed Jun 6 23:21:54 BST 2018

Okay I have learned that dynamic OpenGL means that at runtime Qt will
determine which OpenGL implementation to use.

If OpenGL >= 2.0 is not available it will try ANGLE and if ANGLE is not
available it will use a software renderer[0].

These three files are required for ANGLE to work.

- libEGL.dll
- libGLESv2.dll
- d3dcompiler_XX.dll

libEGL.dll and libGLESv2.dll are already being included in the wheels.

Without allowing Qt to fallback to the software renderer (opengl32sw.dll) I
tried adding the d3dcompiler_47.dll from my Qt 5.10.1 msvc2015 directory
but the application would not work.

Failed to load libEGL (The specified module could not be found.)
QWindowsEGLStaticContext::create: Failed to load and resolve libEGL

Hey Phil, which msvc directory do you copy the .dlls from when building the
I think the error is because the computer I am testing doesn't have
accelerated graphics capabilities which the article mentions will cause the
software renderer to be used.


On Tue, Jun 5, 2018 at 2:12 PM, Cody Scott <cody at perspexis.com> wrote:

> I'm running a simple PyQt5 QML application[0] on a test Windows 7 32-bit
> VM with only Python 3.6.5 and PyQt5==5.10.1 installed but I'm getting an
> error about missing DLLs.
> The full output is attached but the main part is
> QWindowsEGLStaticContext::create: Could not initialize EGL display: error
> 0x3001
> QWindowsEGLStaticContext::create: When using ANGLE, check if
> d3dcompiler_4x.dll is available
> Failed to load opengl32sw.dll (The specified module could not be found.)
> Failed to load and resolve WGL/OpenGL functions
> When I build PyQt5 from source and add the Qt bin directory to my PATH
> there are two additional files that are available.
> d3dcompiler_47.dll and opengl32sw.dll
> If they are not available the application fails with the same message I
> get when PyQt5 was installed from PyPI using the wheel.
> Should these two files be included in the PyQt5 wheels for Windows?
> In the Qt Windows deployment docs[1] these two files are included in the
> table of required files when using "dynamic OpenGL".
> - d3dcompiler_XX.dll is the DirectX shader compiler[2], "where XX is the
> version number that ANGLE (libGLESv2) was linked against."
> - opengl32sw.dll is for software rendering
> 0: https://github.com/siecje/qml-testing
> 1: http://doc.qt.io/qt-5/windows-deployment.html#creating-the-
> application-package
> 2: https://github.com/Microsoft/DirectXShaderCompiler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20180606/77f53471/attachment.html>

More information about the PyQt mailing list