不能使用" cv2.imshow(' Lena',img)"在jupyter笔记本中

时间:2018-02-06 06:52:56

标签: opencv opencv3.3

它给出了这个错误:

error Traceback (most recent call last) <ipython-input-6-5e400e6b9939> in <module>() 1 img = cv2.imread(imgpath) 2 ----> 3 cv2.namedWindow('Lena', cv2.WINDOW_AUTOSIZE) 4 cv2.imshow('Lena', img) 5 cv2.waitKey(0) error: /tmp/build/80754af9/opencv_1512687413662/work/modules/highgui/src/window.cpp:593: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvNamedWindow

我使用conda安装了这个软件包,因此无法理解如何对其进行更改。

1 个答案:

答案 0 :(得分:0)

似乎是你的opencv的问题,从错误我的假设是你从源代码构建它 l建议卸载当前的opencv并通过pip pip install opencv-python

安装