[PyQt] ?==?utf-8?q? pyqtdeploy Windows error - Qt5Core.dll?!
Marius Shekow
marius.shekow at fit.fraunhofer.de
Wed Jul 31 09:39:55 BST 2019
Hi Rob,
no, by default the Qt5 wrapped by PyQt is dynamically built on Windows.
If you are looking to deploy PyQt5 applications EASILY, use PyInstaller. Using pyqtdeploy requires deeper knowledge and understanding of how to build and distribute Qt-based C++ applications. This is something that (pure) Python developers do not possess by default.
In your case, when distributing the exe to other users, you should also put the various Qt-DLLs next to the exe file for it to find it. Typically you don't do this manually, but use the Qt tools. https://doc.qt.io/qt-5/windows-deployment.html has more information.
Best regards!
Marius
On Wednesday, July 31, 2019 09:54 CEST, Rob Kent <rob at gulon.co.uk> wrote:
> So, I created brand new, clean windows 10 install and used the pyqt-demo application in the pyqtdeploy source to create the sysroot.
>
> I now get the following error:
>
> Traceback (most recent call last):
> File "pyqt-demo.py", line 12, 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
>
> My understanding is that (Py)Qt5 has been built statically and there are no DLLs…
>
> Any help here would be gratefully appreciated…. so far only silence.
>
> Thanks, Rob
>
>
> On 30 July 2019 at 15:24:18, Rob Kent (rob at gulon.co.uk) wrote:
>
> Even further to my last,
>
> Doesn’t seem to matter whether I link against the .lib file generated as part of the sysroot or against the .dll belonging to the host python: exactly the same result.
>
> Thanks, Rob
>
>
> On 30 July 2019 at 14:38:30, Rob Kent (rob at gulon.co.uk) wrote:
>
> Further to my last,
>
> It seems to me that ‘_abc’ is a module that is compiled from C and therefore should be included in the python shared lib (is that correct?) and ‘_py_abc’ is a fallback pure python implementation that is not being included as it shouldn’t be needed. If thats’s the case: why can’t my application find the ‘abc’ module in the python lib? Where should I start to look for my misconfiguration?
>
> Thanks, Rob
>
>
> On 30 July 2019 at 13:16:23, Rob Kent (rob at gulon.co.uk) wrote:
>
> HI there,
>
> I’m creating a dead simple application to test a pyqtdeploy sysroot. Everything builds fine, but when I run it I get the following error:
>
>
> Fatal Python error: init_sys_streams: can't initialize sys standard streams
> Traceback (most recent call last):
> File ":/abc.py", line 105, in <module>
> File "bootstrap.py", line 983, in _find_and_load
> File "bootstrap.py", line 965, in _find_and_load_unlocked
> ModuleNotFoundError: No module named '_abc'
>
> During handling of the above exception, another exception occurred:
>
> 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 ":/io.py", line 52, 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 ":/abc.py", line 109, in <module>
> File "bootstrap.py", line 983, in _find_and_load
> File "bootstrap.py", line 965, in _find_and_load_unlocked
> ModuleNotFoundError: No module named '_py_abc'
>
> When I check the listed frozen files from pyqtdeploy-build although abc.py is there, neither _abc.py or _py_abc are included, although they are there in the lib directory.
>
> My setup is:
>
> Windows 10
> MSVC 2017
> Python 3.7.2
> Qt 5.13.0
> Sip 4.19.18
> PyQt 5.13.0
>
> My pyqtdeploy project file is set to use the windows shared library.
>
> Any help gratefully appreciated,
>
> Rob
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list