python cv2:函数未实现。使用Windows、GTK+2.x或Carbon supp重建库

2024-04-16 05:49:55 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行我的代码时,我得到这个错误:“

cv2.imshow("Original",I)
cv2.error: /io/opencv/modules/highgui/src/window.cpp:583: 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 cvShowImage 

我查了很多资料,但还是不知道怎么解决这个问题。有人知道如何解决细节吗?我的系统是Ubuntu和python3.5。 cv2可以在python中导入。 谢谢你的帮助。在


Tags: or代码iosrcmodulesubuntu错误function
1条回答
网友
1楼 · 发布于 2024-04-16 05:49:55

我觉得你好像没有正确地构建opencv库。你能简单总结一下你是怎么安装的吗?你是用git克隆、cmake并从源代码中创建了这个项目,还是仅仅安装了它?在

If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config,

在重建之前,请确保sudo apt安装这两个库。在

相关问题 更多 >