【问题标题】:could not use "cv2.imshow('Lena', img)" in jupyter notebook无法在 jupyter notebook 中使用“cv2.imshow('Lena', img)”
【发布时间】:2018-02-06 06:52:56
【问题描述】:

它给出了这个错误:

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 安装了这个包,所以无法理解如何对其进行更改。

【问题讨论】:

    标签: opencv opencv3.3


    【解决方案1】:

    似乎是您的 opencv 的问题,从错误来看,我的假设是您是从源代码构建的。
    我会建议你卸载当前的 opencv 并通过 pip pip install opencv-python 安装

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-03-26
      • 2021-07-08
      • 1970-01-01
      • 2019-09-15
      • 2020-12-07
      • 1970-01-01
      • 2021-11-16
      相关资源
      最近更新 更多