Ubuntu下pyqt5使用opencv执行报错:

AttributeError: module 'cv2' has no attribute 'nameWindow'

解决:

pip3 install opencv-contrib-python
sudo apt-get install python3-opencv

附4种pip下opencv安装包

#主要模块
pip3 install opencv-python
#更多模块,包含contrib
pip3 install opencv-contrib-python
#不带GUI功能
pip3 install opencv-python-headless
#不带GUI功能,包含contrib
pip3 install opencv-contrib-python-headless
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐