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

List:       pykde
Subject:    Re: [PyQt] Pyqtdeploy - build pyqt app on Windows
From:       Mạnh Tú Vũ <glmanhtu () gmail ! com>
Date:       2019-08-23 15:53:06
Message-ID: DBD5928F-7B4F-41B4-B654-C92A135EE232 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Just for your information. Delete the find_qt function in __init__.py of PyQT5 inside \
the build-win-32 sysroot folder actually did the trick. Now it worked perfectly,

Thanks,

Tu

> On 22 Aug 2019, at 11:17, Grzegorz Bokota <g.bokota@mimuw.edu.pl> wrote:
> 
> This is bug in __init__ of PyQt5 for windows in function find_qt. You need to add \
> second copy of this library in specific path.  
> Grzegorz Bokota
> 
> 
> czw., 22 sie 2019 o 11:56 Mạnh Tú Vũ <glmanhtu@gmail.com \
> <mailto:glmanhtu@gmail.com>> napisał(a): Hi Phil,
> 
> I have already built qt-everywhere with pyqtdeploy-sysroot and I can see those .lib \
> files in my sysroot-win-32/qt/lib. Is that not enough or I have to build something \
> else? 
> <69366583_2626188204071919_3291607272878243840_n.jpeg>
> 
> 
> > On 22 Aug 2019, at 10:28, Phil Thompson <phil@riverbankcomputing.com \
> > <mailto:phil@riverbankcomputing.com>> wrote: 
> > On 22/08/2019 10:04, Mạnh Tú Vũ wrote:
> > > Hello,
> > > I'm trying to build my PyQt application on Windows and I'm not sure that I
> > > understand the way it works. I have built my application into a .exe binary
> > > file but when I was trying to run, it threw an exception of:
> > > C:\boatswain\boatswain\build-win-32>release\Boatswain.exe
> > > > Log file:
> > > > > C:\Users\manhtu\AppData\Local\theboatswain\boatswain\Logs\boatswain.log
> > > > Traceback (most recent call last):
> > > > File "bootstrap.py", line 983, in _find_and_load
> > > > File "bootstrap.py", line 967, in _find_and_load_unlocked
> > > > File "bootstrap.py", line 668, in _load_unlocked
> > > > File "bootstrap.py", line 638, in _load_backward_compatible
> > > > File ":/boatswain/__init__.py", line 1, in <module>
> > > > File "bootstrap.py", line 983, in _find_and_load
> > > > File "bootstrap.py", line 967, in _find_and_load_unlocked
> > > > File "bootstrap.py", line 668, in _load_unlocked
> > > > File "bootstrap.py", line 638, in _load_backward_compatible
> > > > File ":/boatswain/main.py", line 22, in <module>
> > > > File "bootstrap.py", line 983, in _find_and_load
> > > > File "bootstrap.py", line 953, in _find_and_load_unlocked
> > > > File "bootstrap.py", line 219, in _call_with_frames_removed
> > > > File "bootstrap.py", line 983, in _find_and_load
> > > > File "bootstrap.py", line 967, in _find_and_load_unlocked
> > > > File "bootstrap.py", line 668, in _load_unlocked
> > > > File "bootstrap.py", line 638, in _load_backward_compatible
> > > > File ":/PyQt5/__init__.py", line 41, in <module>
> > > > File ":/PyQt5/__init__.py", line 33, in find_qt
> > > > ImportError:
> > > > unable to find Qt5Core.dll on PATH
> > > I suspect, the Qt application was trying to find Qt5Core.dll library,
> > > however, I see in the Makefile.Release, we had already
> > > included  sysroot-win-32\qt\lib\Qt5Core.lib into the application. So, why
> > > do we need the .dll library again?
> > > > LIBS          = /LIBPATH:C:\boatswain\boatswain\sysroot-win-32\lib
> > > > /LIBPATH:C:\boatswain\boatswain\sysroot-win-32\l... \
> > > >                 C:\boatswain\boatswain\sysroot-win-32\qt\lib\Qt5Core.lib
> > > > ...
> > > I have tried to run the app using Qt command line and see it worked.
> > > Because the required libraries are already included in the PATH env. So,
> > > does it mean that I have to distribute the .dll libraries with my
> > > application as well?
> > 
> > If you haven't built a static version of the Qt libraries then yes.
> > 
> > Phil
> 
> _______________________________________________
> 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; \
line-break: after-white-space;" class="">Just for your information. Delete the \
find_qt function in __init__.py of PyQT5 inside the build-win-32 sysroot folder \
actually did the trick. Now it worked perfectly,<div class=""><br class=""></div><div \
class="">Thanks,</div><div class=""><br class=""></div><div class="">Tu<br \
class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 22 Aug \
2019, at 11:17, Grzegorz Bokota &lt;<a href="mailto:g.bokota@mimuw.edu.pl" \
class="">g.bokota@mimuw.edu.pl</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div \
class="">This is bug in __init__ of PyQt5 for windows in function find_qt. You need \
to add second copy of this library in specific path. <br class=""></div><div \
class=""><br class=""></div><div class="">Grzegorz Bokota<br class=""></div><br \
class=""></div><br class=""><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">czw., 22 sie 2019 o 11:56&nbsp;Mạnh Tú Vũ &lt;<a \
href="mailto:glmanhtu@gmail.com" class="">glmanhtu@gmail.com</a>&gt; napisał(a):<br \
class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div \
style="overflow-wrap: break-word;" class="">Hi Phil,<div class=""><br \
class=""></div><div class="">I have already built qt-everywhere with \
pyqtdeploy-sysroot and I can see those .lib files in my sysroot-win-32/qt/lib. Is \
that not enough or I have to build something else?</div><div class=""><br \
class=""></div><div class=""><span \
id="cid:16cb8d0f686db2e846e1">&lt;69366583_2626188204071919_3291607272878243840_n.jpeg&gt;</span></div><div \
class=""><br class=""><div class=""><br class=""><blockquote type="cite" \
class=""><div class="">On 22 Aug 2019, at 10:28, Phil Thompson &lt;<a \
href="mailto:phil@riverbankcomputing.com" target="_blank" \
class="">phil@riverbankcomputing.com</a>&gt; wrote:</div><br \
class="gmail-m_3858573603532732017Apple-interchange-newline"><div 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-transf \
orm:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline" \
class="">On 22/08/2019 10:04, Mạnh Tú Vũ wrote:</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;text-decoration:none" \
class=""><blockquote type="cite" \
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;text-decoration:none" \
class="">Hello,<br class="">I'm trying to build my PyQt application on Windows and \
I'm not sure that I<br class="">understand the way it works. I have built my \
application into a .exe binary<br class="">file but when I was trying to run, it \
threw an exception of:<br \
class="">C:\boatswain\boatswain\build-win-32&gt;release\Boatswain.exe<br \
class=""><blockquote type="cite" class="">Log file:<br class=""><blockquote \
type="cite" class="">C:\Users\manhtu\AppData\Local\theboatswain\boatswain\Logs\boatswain.log<br \
class=""></blockquote>Traceback (most recent call last):<br class="">File \
"bootstrap.py", line 983, in _find_and_load<br class="">File "bootstrap.py", line \
967, in _find_and_load_unlocked<br class="">File "bootstrap.py", line 668, in \
_load_unlocked<br class="">File "bootstrap.py", line 638, in \
_load_backward_compatible<br class="">File ":/boatswain/__init__.py", line 1, in \
&lt;module&gt;<br class="">File "bootstrap.py", line 983, in _find_and_load<br \
class="">File "bootstrap.py", line 967, in _find_and_load_unlocked<br class="">File \
"bootstrap.py", line 668, in _load_unlocked<br class="">File "bootstrap.py", line \
638, in _load_backward_compatible<br class="">File ":/boatswain/main.py", line 22, in \
&lt;module&gt;<br class="">File "bootstrap.py", line 983, in _find_and_load<br \
class="">File "bootstrap.py", line 953, in _find_and_load_unlocked<br class="">File \
"bootstrap.py", line 219, in _call_with_frames_removed<br class="">File \
"bootstrap.py", line 983, in _find_and_load<br class="">File "bootstrap.py", line \
967, in _find_and_load_unlocked<br class="">File "bootstrap.py", line 668, in \
_load_unlocked<br class="">File "bootstrap.py", line 638, in \
_load_backward_compatible<br class="">File ":/PyQt5/__init__.py", line 41, in \
&lt;module&gt;<br class="">File ":/PyQt5/__init__.py", line 33, in find_qt<br \
class="">ImportError:<br class="">unable to find Qt5Core.dll on PATH<br \
class=""></blockquote>I suspect, the Qt application was trying to find Qt5Core.dll \
library,<br class="">however, I see in the Makefile.Release, we had already<br \
class="">included &nbsp;sysroot-win-32\qt\lib\Qt5Core.lib into the application. So, \
why<br class="">do we need the .dll library again?<br class=""><blockquote \
type="cite" class="">LIBS &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= \
/LIBPATH:C:\boatswain\boatswain\sysroot-win-32\lib<br \
class="">/LIBPATH:C:\boatswain\boatswain\sysroot-win-32\l... \
C:\boatswain\boatswain\sysroot-win-32\qt\lib\Qt5Core.lib<br class="">...<br \
class=""></blockquote>I have tried to run the app using Qt command line and see it \
worked.<br class="">Because the required libraries are already included in the PATH \
env. So,<br class="">does it mean that I have to distribute the .dll libraries with \
my<br class="">application as well?<br class=""></blockquote><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;text-decoration:none" \
class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-vari \
ant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent: \
0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline" \
class="">If you haven't built a static version of the Qt libraries then \
yes.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-vari \
ant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent: \
0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none" \
class=""><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-varian \
t-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none" \
class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-vari \
ant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent: \
0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline" \
class="">Phil</span></div></blockquote></div><br \
class=""></div></div>_______________________________________________<br class=""> \
PyQt mailing list&nbsp; &nbsp; <a href="mailto:PyQt@riverbankcomputing.com" \
target="_blank" class="">PyQt@riverbankcomputing.com</a><br class=""> <a \
href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" \
target="_blank" class="">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br \
class=""> </blockquote></div>
</div></blockquote></div><br class=""></div></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