2017-05-30 119 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) –

回答