pypa / packaging-problems

An issue tracker for the problems in packaging
145 stars 34 forks source link

Missing library for PyQt 5.11 (Broken QtMultimedia module) #211

Open willbelr opened 5 years ago

willbelr commented 5 years ago

Since version 5.11, the QMediaPlayer widget (QtMultimedia module) require an additional library to communicate with the GStreamer backend on Linux. The file libQt5MultimediaGstTools.so.5 is provided by the package libqt5multimediagsttools5 on Ubuntu 18.10, but is not available on earlier versions. Therefore, installing PyQt from pip3 on these system introduce a broken dependancy, rendering QMediaPlayer unusable.

# Steps to reproduce (demo software installation; qoob is a PyQt5 media player) sudo apt-get install python3-setuptools python3-pip sudo pip3 install qoob export QT_DEBUG_PLUGINS=1 qoob

# Result Got keys from plugin meta data ("gstreamermediaplayer") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/mediaservice" ... 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) QLibraryPrivate::loadPlugin failed on "/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"

# Solution 1 Manually add the file libQt5MultimediaGstTools.so.5 to /usr/lib

# Solution 2 apt install libqt5multimedia5-plugins sudo rm /usr/local/lib/python3.6/dist-packages/PyQt5/Qt/plugins/mediaservice/libgstmediaplayer.so sudo ln -s /usr/lib/x86_64-linux-gnu/qt5/plugins/mediaservice/libgstmediaplayer.so /usr/local/lib/python3.6/dist-packages/PyQt5/Qt/plugins/mediaservice/libgstmediaplayer.so

# More details Operating system: Ubuntu 18.04 / Mint 19 Python version: 3.6.5 pip version: 9.0.1 Initial bug report: https://forums.linuxmint.com/viewtopic.php?f=47&t=280944 Missing package: https://packages.ubuntu.com/cosmic/libqt5multimediagsttools5

rgsl888 commented 5 years ago

How are you generating the libQt5MultimediaGstTools.so.5 in 18.04?

And I tried copying the libgstmediaplayer.so, but I get blank video screen and but I can see that it is playing video. After that if try to play again I get the following errors,

gst_vaapi_window_reconfigure: assertion 'window != NULL' failed gst_vaapi_window_get_size: assertion 'window != NULL' failed

amir04lm26 commented 5 years ago

How can I fix this error in raspberry pi? Duplicate of #

willbelr commented 5 years ago

It seems to be fixed with the latest PyQt wheel provided by PyPi (Qt 5.13)