[PyQt] Pyqtdeploy - build pyqt app on Windows

Mạnh Tú Vũ glmanhtu at gmail.com
Fri Aug 23 16:53:06 BST 2019


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 at 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 at gmail.com <mailto:glmanhtu at 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 at riverbankcomputing.com <mailto:phil at 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 at riverbankcomputing.com <mailto:PyQt at riverbankcomputing.com>
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt <https://www.riverbankcomputing.com/mailman/listinfo/pyqt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190823/742cc973/attachment-0001.html>


More information about the PyQt mailing list