[PyQt] Wondering if PyQt5 packaging might be missing a lib on linux...

Calin Culianu calin.culianu at gmail.com
Fri Apr 26 15:21:49 BST 2019


So I was trying to use QtMultimedia to detect a camera and do video capture
via python.

QCameraInfo.availableCameras() was returning an empty list.. and i did some
troubleshooting and it turns out a lib is missing in the PyQt5 packaged Qt
libs.

""/usr/local/lib/python3.6/dist-packages/PyQt5/Qt/plugins/mediaservice/libgstmediaplayer.so"
: "Cannot load library
/usr/local/lib/python3.6/dist-packages/PyQt5/Qt/plugins/mediaservice/libgstmediaplayer.so:
(libQt5MultimediaGstTools.so.5: cannot open shared object file: No such
file or directory)"
defaultServiceProvider::requestService(): no service found for -
"org.qt-project.qt.mediaplayer"

This is using PyQt5 5.12.1 (latest).. It seem on Linux the PyQt5 doesn't
come with all the qt5multimedia libs and plugins.

See a related issue on this project page:
https://github.com/pypa/packaging-problems/issues/211

It seemed to work after doing:

# sudo apt install libqt5multimedia5 libqt5multimedia5-plugins

After which point PyQt5 picked up the system lib instead.

This leads me to suspect that the PyQt5 packaged libs are missing that gst
lib on Linux.

Any ideas if this is a bug in PyQt5 or some other issue?

-Calin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190426/12ba411d/attachment.html>


More information about the PyQt mailing list