<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:Calibri;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:Calibri;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello All,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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. 
</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However when attempting to get it to run on a Windows 10 I have run into the dreaded:</p>
<p class="MsoNormal">This application failed to start because it could not find or load the Qt platform plugin “windows”</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is usually a sign that the qt.conf is bad but why would it work on Windows 8 but not Windows 10?  Furthermore it does not work even if I put a qt.conf file right next to the python.exe.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">import os<o:p></o:p></p>
<p class="MsoNormal">import sys<o:p></o:p></p>
<p class="MsoNormal">dir_name = os.path.dirname(__file__)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">_path = os.path.dirname(__file__) + '\\Qt\\bin;' + os.environ['PATH']<o:p></o:p></p>
<p class="MsoNormal">os.environ['PATH'] = _path<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">os.environ['QML_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')<o:p></o:p></p>
<p class="MsoNormal">os.environ['QML2_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">os.environ['QT_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt', 'plugins')<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt', 'plugins', 'platforms')</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However the message persists.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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?</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">With respect,</p>
<p class="MsoNormal">Nathan<o:p></o:p></p>
</div>
</body>
</html>