2017-05-30 120 views
-1

我已经在我的机器上安装了Ubuntu 14.04(64位)。OpenCV错误:未实现WaitKey()函数

我已经安装了python 3.6和OpenCV 3。当我试图运行下面的代码行时,会引发错误。

key = cv2.waitKey(0) 

的错误如下:

error: /feedstock_root/build_artefacts/opencv_1489510052062/work/opencv-3.1.0/modules/highgui/src/window.cpp:616: 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 cvWaitKey

我已经安装了libgtk2.0-dev软件包,但它并没有得到解决。 我是否需要安装其他软件包?

+0

你有没有在你的代码中使用的TrackBar?你能否显示你的代码,以便知道你的代码放在哪里? – thewaywewere

+0

“我已经安装了libgtk2.0-dev软件包,但它没有解决。”是的,你需要执行所有的指示,而不仅仅是一步。它很清楚地说“重建图书馆”... [相关问题](https://stackoverflow.com/search?q=The+function+is+not+implemented.+Rebuild+the+library) –

回答