AttributeError: module 'cv2' has no attribute 'nameWindow'
时间: 2023-09-29 11:11:23 浏览: 105
no moudel named cv2
在Ubuntu下,当使用pyqt5和OpenCV执行代码时,可能会出现"AttributeError: module 'cv2' has no attribute 'nameWindow'"的错误。
这个错误通常是由于拼写错误导致的。正确的函数名应该是"namedWindow"而不是"nameWindow"。因此,你需要检查你的代码并确保你正确地拼写了函数名。重新运行代码,应该就不会再出现这个错误了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Ubuntu_opencv:AttributeError: module ‘cv2‘ has no attribute ‘nameWindow](https://blog.csdn.net/qq_36917144/article/details/111467056)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [【Bug】AttributeError: module ‘cv2‘ has no attribute ‘imread](https://blog.csdn.net/AugustMe/article/details/123395034)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [无需降级scipy的情况下解决AttributeError: module ‘scipy.misc’ has no attribute ‘imread’,imresize...](https://download.csdn.net/download/weixin_38701640/13745210)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文