Pyinstaller error building Qt Application

319 Views Asked by At

I am building an exe from a PyQt+pyqtgraph project.
Everything is set correctly, also in the .spec file, since i correctly built a version of the software running pyinstaller.
Now, I did some modifications to my project, but I am not able to build it anymore. Pyinstaller returns:

PyInstaller.isolated._parent.SubprocessDiedError: Child process died calling _collect_submodules() with args=('pyqtgraph.canvas', 'ignore') and kwargs={}. Its exit code was 3221226505.
2

There are 2 best solutions below

0
Mudu 93 On

Just fixed in two steps:

  1. adding pyqtgraph.canvas to hidden imports in .spec file. Still not working.
  2. checking installed packages with pip list, i found out that both PyQt5 and PyQt6 were installed. Hence I uninstalled PyQt6.

Then everything went ok.

0
khan On

This happened to me after upgrading to Python 3.12. I don't know why, but the build works when I pin my PyQt6 version to 6.5.3, but then pyqtgraph complains on runtime that it cannot find appropriate Qt bindings. I have temporarily fixed this by overwriting the _internal/PyQt6 folder (I am using --onedir) with the one I get from building with Python 3.11 with the latest PyQt (6.6.1).

Edit: there seems to be a related github issue.

Edit 2: this was fixed in pyqtgraph 0.13.4.