[PyQt] Pyqtdeploy - build pyqt app on Windows

Mạnh Tú Vũ glmanhtu at gmail.com
Thu Aug 22 10:04:19 BST 2019


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?

Thank you,

Tu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190822/b1afd767/attachment.html>


More information about the PyQt mailing list