[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] PyQt5 for Python 2.7 on Windows 10
From:       Barry Scott <barry () barrys-emacs ! org>
Date:       2017-05-31 18:52:22
Message-ID: 8D02C860-5CB5-4012-8F16-4D983BE1A372 () barrys-emacs ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On 31 May 2017, at 01:30, Nathan Warmerdam <nbwarmerdam@integrated-informatics.com> \
> wrote: 
> 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.

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.

This is version you need if you are using binaries from pyton.org \
<http://pyton.org/>: https://www.microsoft.com/en-gb/download/details.aspx?id=44266 \
<https://www.microsoft.com/en-gb/download/details.aspx?id=44266> (google visual \
studio for python)


Barry


> 
> 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?  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@riverbankcomputing.com \
> <mailto:PyQt@riverbankcomputing.com> \
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt \
> <https://www.riverbankcomputing.com/mailman/listinfo/pyqt>


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote \
type="cite" class=""><div class="">On 31 May 2017, at 01:30, Nathan Warmerdam &lt;<a \
href="mailto:nbwarmerdam@integrated-informatics.com" \
class="">nbwarmerdam@integrated-informatics.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div class="WordSection1" \
style="page: WordSection1; font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; \
text-align: start; text-indent: 0px; text-transform: none; white-space: normal; \
word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, \
255);"><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class="">Hello All,</div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" class="">I have built (with \
commercial license) PyQt5 for python 2.7.&nbsp; I used VS 2015 and packaged my build \
with what I believe to be the appropriate windows \
redistributables.</div></div></div></blockquote><div><br class=""></div><div>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 &nbsp;problems with C RTL cross version \
mixing that does not work in all cases.</div><div><br class=""></div><div>This is \
version you need if you are using binaries from <a href="http://pyton.org" \
class="">pyton.org</a>:&nbsp;<a \
href="https://www.microsoft.com/en-gb/download/details.aspx?id=44266" \
class="">https://www.microsoft.com/en-gb/download/details.aspx?id=44266</a></div><div>(google \
visual studio for python)</div><div><br class=""></div><div><br \
class=""></div><div>Barry</div><div class=""><br class=""></div><div class=""><br \
class=""></div><blockquote type="cite" class=""><div class=""><div \
class="WordSection1" style="page: WordSection1; font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
background-color: rgb(255, 255, 255);"><div style="margin: 0in 0in 0.0001pt; \
font-size: 12pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div \
style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class="">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.&nbsp;</div><div \
style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class=""><o:p class="">&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; \
font-size: 12pt; font-family: Calibri;" class="">However when attempting to get it to \
run on a Windows 10 I have run into the dreaded:</div><div style="margin: 0in 0in \
0.0001pt; font-size: 12pt; font-family: Calibri;" class="">This application failed to \
start because it could not find or load the Qt platform plugin "windows"</div><div \
style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class=""><o:p class="">&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; \
font-size: 12pt; font-family: Calibri;" class="">This is usually a sign that the \
qt.conf is bad but why would it work on Windows 8 but not Windows 10?&nbsp; \
Furthermore it does not work even if I put a qt.conf file right next to the \
python.exe.</div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: \
Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: 0in 0in \
0.0001pt; font-size: 12pt; font-family: Calibri;" class="">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.&nbsp; Like this:</div><div style="margin: 0in 0in 0.0001pt; font-size: \
12pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div \
style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class="">import os<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; \
font-size: 12pt; font-family: Calibri;" class="">import sys<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class="">dir_name = os.path.dirname(__file__)<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" class="">_path = \
os.path.dirname(__file__) + '\\Qt\\bin;' + os.environ['PATH']<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class="">os.environ['PATH'] = _path<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class="">os.environ['QML_IMPORT_PATH'] = os.path.join(dir_name, 'Qt', 'qml')<o:p \
class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class="">os.environ['QML2_IMPORT_PATH'] = \
os.path.join(dir_name, 'Qt', 'qml')<o:p class=""></o:p></div><div style="margin: 0in \
0in 0.0001pt; font-size: 12pt; font-family: Calibri;" class=""><o:p \
class="">&nbsp;</o:p></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class="">os.environ['QT_PLUGIN_PATH'] = os.path.join(dir_name, \
'Qt', 'plugins')<o:p class=""></o:p></div><div style="margin: 0in 0in 0.0001pt; \
font-size: 12pt; font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div \
style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class="">os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = os.path.join(dir_name, 'Qt', \
'plugins', 'platforms')</div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" class="">However the \
message persists.</div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; \
font-family: Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: \
0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" class="">As I said, it \
works on independent Windows 8.1 machines but not with Windows 10.&nbsp; Does anyone \
have any tips or experience or success with PyQt5 for python 2.7 on Windows \
10?</div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: \
Calibri;" class=""><o:p class="">&nbsp;</o:p></div><div style="margin: 0in 0in \
0.0001pt; font-size: 12pt; font-family: Calibri;" class="">With respect,</div><div \
style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: Calibri;" \
class="">Nathan<o:p class=""></o:p></div></div><span style="font-family: Helvetica; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; \
background-color: rgb(255, 255, 255); float: none; display: inline !important;" \
class="">_______________________________________________</span><br \
style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" \
class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); float: \
none; display: inline !important;" class="">PyQt mailing list \
&nbsp;&nbsp;&nbsp;</span><a href="mailto:PyQt@riverbankcomputing.com" style="color: \
rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: \
rgb(255, 255, 255);" class="">PyQt@riverbankcomputing.com</a><br style="font-family: \
Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; \
font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255);" class=""><a \
href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" style="color: \
rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: \
12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; \
text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: \
rgb(255, 255, 255);" \
class="">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></div></blockquote></div><br \
class=""></body></html>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic