No module QtMultimedia [Mac OS - Anaconda - Python 3.7 - PyQt5]

我只是一个虾纸丫 提交于 2020-06-01 03:49:22

问题


I would like to play with QtMultimedia of PyQt5 but this does not work.

> conda list pyqt
# packages in environment at /anaconda3:
#
# Name       Version       Build  Channel
pyqt         5.9.2         py37h655552a_2
> python
Python 3.7.0 (default, Jun 28 2018, 07:39:16)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda custom (64-bit) on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyQt5.QtMultimedia
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'PyQt5.QtMultimedia'

This looks like a bug.

Something strange : I have a file /anaconda3/lib/python3.7/site-packages/PyQt5/QtMultimediaWidgets.pyi which imports QtMultimedia but no QtMultimedia.pyi.

Can I easily fix this and what is the best way to report this bug ?


回答1:


Use:

pip3 install pyqt5 --user

There is probably a conda equivalent, but this works for me in a conda environment without any problems. I presume that there is some permissions issue trying to install it for all users.




回答2:


Indeed this was a bug from conda. I have made recently some updates that fixe my problem.



来源:https://stackoverflow.com/questions/52973871/no-module-qtmultimedia-mac-os-anaconda-python-3-7-pyqt5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!