# cv2.imshow("Result", img)错误/error

**URL:** <https://forum.opencv.org/t/cv2-imshow-result-img-error/11908>\
**Category:** Python\
**Created:** [February 8, 2023, 12:43pm UTC](https://forum.opencv.org/t/cv2-imshow-result-img-error/11908 "2023-02-08T12:43:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![5587157](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/5587157/32/7126_2.png) [@5587157](https://forum.opencv.org/u/5587157)\
**Post date:** [February 8, 2023, 12:43pm UTC](https://forum.opencv.org/t/cv2-imshow-result-img-error/11908/1 "2023-02-08T12:43:40Z")

</div>

​​​​​​​​​​​  
Traceback (most recent call last):  
File “E:\pythonProject\lianxi\图片匹配\test.py”, line 16, in   
cv2.imshow(“Result”, img)  
cv2.error: OpenCV(4.7.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1272: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function ‘cvShowImage’

## 我的系统是window系统，用的pycharm，python版本是3.9.4，opencv版本号是4.7.0.68 ■opencv\_ contrib. _python-4.7.0.68.dist-info ■opencv_ contrib\_ python headless-4.7.0.68.dist-info ■opencv\_ python-4.7.0.68.dist-info ■opencv\_ python. headless-4.7.0.68.dist-info 我想知道报这个错的解决办法是啥，问题是在哪里，我有点晕了。

My system is a window system. It uses pycharm. The python version is 3.9.4, and the opencv version number is 4.7.0.68

■opencv\_ contrib. \_ python-4.7.0.68.dist-info

■opencv\_ contrib\_ python headless-4.7.0.68.dist-info

■opencv\_ python-4.7.0.68.dist-info

■opencv\_ python. headless-4.7.0.68.dist-info

I want to know what is the solution to this error and where is the problem. I’m a little dizzy. 😢

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [February 8, 2023, 12:51pm UTC](https://forum.opencv.org/t/cv2-imshow-result-img-error/11908/2 "2023-02-08T12:51:53Z")

</div>

> [@5587157](#):
>
> I want to know what is the solution to this error and where is the problem.

you’ve installed far too many (4 !) opencv versions on the same machine. uninstall them all, then pick _exactly one_  
(probably : ` pip install opencv_contrib_python` )

((also, just saying: the ‘headless’ versions are for e.g. webservers, no gui there !))

---

<div class="post-metadata">

**Author:** ![5587157](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/5587157/32/7126_2.png) [@5587157](https://forum.opencv.org/u/5587157)\
**Post date:** [February 9, 2023, 5:33am UTC](https://forum.opencv.org/t/cv2-imshow-result-img-error/11908/3 "2023-02-09T05:33:32Z")

</div>

谢谢你的方法，解决了我的问题，非常感谢 🙏  
Thank you for your method and solving my problem. Thank you very much
