PySide6 dependency problem within Virtual Python Environment
Rudy Marty last edited by Rudy Marty
I decided to migrate from Xubuntu 20.04 LTS to Linux Mint 20.2, and start from a fresh Python config. I have setup my project with a
venvand few packages (Numpy, Shapely, Pyside6, ...), and I got the following error message :
from PySide6.QtWidgets import QApplication ImportError: libgssapi_krb5.so.2: cannot open shared object file: No such file or directory
It looks like Qt libraries within a
venvcan't find properly this system lib ...
Have you any idea how to solve this ?
PS : of course I have checked that I actually have the lib : /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
JonB last edited by JonB
Is https://stackoverflow.com/questions/69865952/importerror-libgssapi-krb5-so-2-cannot-open-shared-object-file-no-such-file-o you too, or is it someone else reporting same as you? EDIT Just found https://stackoverflow.com/questions/66420927/libgssapi-krb5-so-2-cannot-open-shared-object-file-no-such-file-or-directory too, you can't be all these people ;-)
Have you run
ldd /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2? Any missing dependencies can result in the error message naming this library.
Have you tried/can you try testing this outside the venv, so we know for sure it's that?
Rudy Marty last edited by
No, it is not me :-)
I already have run
lddon this lib and even on the others from PySIde: everything is fine (and found !).
I just tried outside venv: same result.
The fact that this specific lib makes an issue is very strange because the others are found beside.
I can make
import PySide6and it works, but the libs which need libgssapi_krb5 are the only problem in the end.
JonB last edited by
OK, well you see at least two other people have posted same at stackoverflow, so it must be a "thing", but sadly it seems without resolution. I wonder if @eyllanesc will see this, as that user is an expert in Python/PyQt/PySide and the crossover to Qt/C++....?
Rudy Marty last edited by
I just made some progress few minutes ago.
I found a very ugly bug in the Mind/Keyboard interface called the brain. My brain, indeed.
I made a mistake in my
pip installconfig that I have fixed, and everything is working now.
When one try to play with paths, better to know your stuff. Lessons learned !
Anyway I apologize, and thank you for your help :-)
cleemesser last edited by
I use ubuntu 20.04 and have seen this problem happen in my virtual environments on occasion, most recently when I tried installing PySide6 into a conda environment (version 6.2)
It turned out that my conda environment already had PyQt5 and qt-5.12.2 installed due to it being pulled in via a dependency. When I removed PyQt5, the pip installed pyside6 worked without the library error.