[PyQt] PyQt5 for Python 2.7 on Windows 10

Nathan Warmerdam nbwarmerdam at integrated-informatics.com
Fri Jun 2 23:24:18 BST 2017


Hey Elvis,
That was a good idea, thank you.  Dependency Walker isn’t exactly perfect on Windows 10 but its still useable.  Unfortunately I didn’t see anything blatantly obvious as missing.
Thanks again,
Nathan

From: Elvis Stansvik <elvstone at gmail.com>
Date: Wednesday, May 31, 2017 at 11:38 PM
To: Nathan Warmerdam <nbwarmerdam at integrated-informatics.com>
Cc: PyQT mailing list <pyqt at riverbankcomputing.com>
Subject: Re: [PyQt] PyQt5 for Python 2.7 on Windows 10


Den 31 maj 2017 2:31 fm skrev "Nathan Warmerdam" <nbwarmerdam at integrated-informatics.com<mailto: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<mailto: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/20170602/99c8e964/attachment-0001.html>


More information about the PyQt mailing list