<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:"Times New Roman";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
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-size:10.0pt;}
@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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">Would this then mean that I would need to also build Qt myself with the VS for python as well? To avoid any incompatibilities?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Barry Scott <barry@barrys-emacs.org><br>
<b>Date: </b>Wednesday, May 31, 2017 at 11:52 AM<br>
<b>To: </b>Nathan Warmerdam <nbwarmerdam@integrated-informatics.com><br>
<b>Cc: </b>"pyqt@riverbankcomputing.com" <pyqt@riverbankcomputing.com><br>
<b>Subject: </b>Re: [PyQt] PyQt5 for Python 2.7 on Windows 10<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On 31 May 2017, at 01:30, Nathan Warmerdam <<a href="mailto:nbwarmerdam@integrated-informatics.com">nbwarmerdam@integrated-informatics.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">Hello All,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">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.<o:p></o:p></span></p>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">That is the wrong VS version for python2.7, unless you rebuilt python 2.7 and all extensions using VS2015 you might hit bugs because of problems with C RTL cross version mixing that does not work in all cases.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is version you need if you are using binaries from <a href="http://pyton.org">
pyton.org</a>: <a href="https://www.microsoft.com/en-gb/download/details.aspx?id=44266">https://www.microsoft.com/en-gb/download/details.aspx?id=44266</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">(google visual studio for python)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Barry<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">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. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">However when attempting to get it to run on a Windows 10 I have run into the dreaded:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">This application failed to start because it could not find or load the Qt platform plugin “windows”<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">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.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">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:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">import os<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">import sys<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">dir_name = os.path.dirname(__file__)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">_path = os.path.dirname(__file__) + '\\Qt\\bin;' + os.environ['PATH']<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">os.environ['PATH'] = _path<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">os.environ['QML_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">os.environ['QML2_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">os.environ['QT_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt', 'plugins')<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt', 'plugins', 'platforms')<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">However the message persists.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">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?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">With respect,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:Calibri">Nathan<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica;background:white">_______________________________________________</span><span style="font-size:9.0pt;font-family:Helvetica"><br>
<span style="background:white">PyQt mailing list </span></span><a href="mailto:PyQt@riverbankcomputing.com"><span style="font-size:9.0pt;font-family:Helvetica;color:#954F72;background:white">PyQt@riverbankcomputing.com</span></a><span style="font-size:9.0pt;font-family:Helvetica"><br>
</span><a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt"><span style="font-size:9.0pt;font-family:Helvetica;color:#954F72;background:white">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</span></a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
</div>
</body>
</html>