I am trying to build a GUI integrating videos, and for this I need to import PyQt5.QtMultimedia. Yet when trying to import the module (import PyQt5.QtMultimedia) I receive an error: ModuleNotFoundError: No module named 'PyQt5.QtMultimedia'.
I am working on Ubuntu 18.04, and my Python packages come from Anaconda. The "conda list" command reports that pyqt is installed properly, version 5.9.2. All the other PyQt5 imports have worked fine so far, it is really only PyQt5.QtMultimedia that causes issues.
This problem is already discussed in these posts: link1, link2, but they do not provide any solution.
I have tried uninstalling (sudo apt-get remove python3-pyqt5.qtmultimedia) and re-installing (sudo apt install python3-pyqt5.qtmultimedia), without success.
Could someone help? My project is really stuck if I can't fix this issue.
Thanks a lot.
So, I managed to solve the problem. Kind of, using brute strength.
There is basically no possible workaround with conda as:
So, the only solution left is not to use Python with conda. I uninstalled conda (certainly not necessary, one may just use base python if installed), and went back to base python. Unfortunately, that also means the packages provided by conda are not available anymore. Still, I managed to install PyQt5 properly, and I can now use QtMultimedia normally.
pros: it works
cons: fix is extreme as it implies giving up using conda altogether