New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing PySide6.QtQml results in ImportError when running frozen app #7197
Comments
Hmmm, indeed. I cannot reproduce this on my main Fedora 36 system, nor under Ubuntu 20.04 (which is also what our CI is running, and the QtQml tests are passing there), but I can reproduce it under Ubuntu 22.04. For some reason |
The problem is that
And it looks like it comes up empty because it actually crashes. So that's not our bug - if we cannot use The interesting part is that this does not happen on Fedora 36 that also uses glibc 2.35. And more interestingly, it also does not seem to happen in |
How much damage do you think it would do if we made non-zero exit codes from pyinstaller/PyInstaller/depend/bindepend.py Line 615 in 93446ff
|
Not sure, we'd need to check what are situations that make Although in this particular case, since the process segfaults, its exit code will be invalid anyway (and there should be some other parameter indicating that it crashed). |
I have the same issue. On Ubuntu 22.04, we used pyinstaller 5.5, 5.6, 5.6.1 to build executable with PySide6.2.4, both libQt6Gui and libQt6Widgets library file are missing. However, these versions work well on Ubuntu 20.04. |
I guess we'll need to report this on Ubuntu's launchpad if we want it to change. It looks like they're currently unaware of it (search query). |
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1995362 This will become a hassle for us once the CI runners switch to |
For what it's worth, latest Ubuntu is a poor choice for a build platform since its GLIBC version will likely be higher than that of whoever tries to run your application which ultimately leads to symbol errors at runtime. Stick to an older version for building. |
Indeed, Ubuntu 22.04 is not a good choice. But, my executable built on Ubuntu 20.04 causes an error when running on Ubuntu 22.04.
|
I’m not sure if this is recommended by the pyinstaller team but you may want to look into excluding that library from the build. There’s an interesting list of recommended libraries to exclude in the AppImage repo. |
For my specific use case, I am targeting Ubuntu 22.04 only, so prefer to build there for maximum compat. My workaround was to switch to PyQt6 which happily required only trivial code changes. |
It looks like launchpad uses some kind of heat metrics to prioritise issues. Hitting the me too button (https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1995362/+affectsmetoo) increases the priority. Do me a favour and press that button. |
ubuntu-latest started resolving to ubuntu-22.04, which is currently affected by pyinstaller#7197.
ubuntu-latest started resolving to ubuntu-22.04, which is currently affected by #7197.
So the bad news is that this is not specific to Ubuntu, but rather to (vanilla) I suppose the silver lining is that if we are forced to switch to 22.04 for our CI runners, we can set up a PPA and install a patched version of |
I think I'd be more inclined to just run the whole job in a docker container if it really came to that. |
have you tried:
find libpyside6qml.abi3.so.6.4 path, and create a soft link
|
Thank you for that workaround, |
Fixed by |
When application includes the following import:
import PySide6.QtQml
Running the frozen application results in the following runtime error:
ImportError: libpyside6qml.abi3.so.6.4: cannot open shared object file: No such file or directory
Context information
pyinstaller --version
:5.6.1
3.10.6
Ubuntu 22.04.1, 5.15.0-52-generic
apt (included in distro
No
Yes, downloaded and tried today, same result
Make sure everything is packaged correctly
--noupx
or setupx=False
in your .spec-file--debug
topyi-makespec
orpyinstaller
or useEXE(..., debug=1, ...)
in your .spec file.A minimal example program which shows the error
Stacktrace / full error message
The text was updated successfully, but these errors were encountered: