调用OpenCV时出现问题
收藏回复举报
调用OpenCV时出现问题
t('forum.solved') 已解决
发表于2024-04-15 18:10:14
0 查看

我在Jupyter上调用

cv2.namedWindow('src')

cv2.setMouseCallback('src', draw_line)  #每当窗口有鼠标行为,都会调用draw_line函数

这两行代码时,出现了以下的报错。

OpenCV(4.7.0) /io/opencv/modules/highgui/src/window.cpp:1255: 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 'cvNamedWindow'

由 你 发送: OpenCV(4.7.0) /io/opencv/modules/highgui/src/window.cpp:1255: 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 'cvNamedWindow'

应该如何解决?

我要发帖子