[PyQt] PyQt5 for Python 2.7 on Windows 10

Elvis Stansvik elvstone at gmail.com
Thu Jun 1 07:38:51 BST 2017


Den 31 maj 2017 2:31 fm skrev "Nathan Warmerdam" <
nbwarmerdam at integrated-informatics.com>:
>
> Hello All,
>
>
>
> I have built (with commercial license) PyQt5 for python 2.7.  I used VS
2015 and packaged my build with what I believe to be the appropriate
windows redistributables.
>
>
>
> With the resulting build I have had success getting it to run on an
independent (i.e. not the build machine) Windows 8.1 machine.
>
>
>
> However when attempting to get it to run on a Windows 10 I have run into
the dreaded:
>
> This application failed to start because it could not find or load the Qt
platform plugin “windows”
>
>
>
> This is usually a sign that the qt.conf is bad but why would it work on
Windows 8 but not Windows 10?

The other option is that it is found, but cannot be loaded for some reason.

Perhaps take a look at qwindows.dll with Dependency Walker on the Win 10
machine (or dumpbin /dependents from a VS command prompt if you have one)
to see if something is missing, though I expect the dependencies to be
minimal.

Elvis

Furthermore it does not work even if I put a qt.conf file right next to the
python.exe.
>
>
>
> I have followed the file structure used by Phil in the Python 3 version
of PyQt5 (e.g. PyQt5\Qt\bin and PyQt5\plugins, etc) and modified the
__init__.py file to set various environment variables.  Like this:
>
>
>
> import os
>
> import sys
>
> dir_name = os.path.dirname(__file__)
>
>
>
> _path = os.path.dirname(__file__) + '\\Qt\\bin;' + os.environ['PATH']
>
> os.environ['PATH'] = _path
>
>
>
> os.environ['QML_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')
>
> os.environ['QML2_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')
>
>
>
> os.environ['QT_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt', 'plugins')
>
>
>
> os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt',
'plugins', 'platforms')
>
>
>
> However the message persists.
>
>
>
> As I said, it works on independent Windows 8.1 machines but not with
Windows 10.  Does anyone have any tips or experience or success with PyQt5
for python 2.7 on Windows 10?
>
>
>
> With respect,
>
> Nathan
>
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170601/2e388b8a/attachment.html>


More information about the PyQt mailing list