程序出现了下列错误:
OpenCV Error: Unspecified error (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 cvNamedWindow, file /opt/conda/conda-bld/opencv_1491943970124/work/opencv-3.1.0/modules/highgui/src/window.cpp, line 527
Traceback (most recent call last):
File "test.py", line 3, in <module>
cv2.namedWindow("Image")
cv2.error: /opt/conda/conda-bld/opencv_1491943970124/work/opencv-3.1.0/modules/highgui/src/window.cpp:527: 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
它告诉我说,我有几个库没装,还让我重新cmake。(这个时候的opencv功能是不完整的,不过还是可以勉强用)
一开始,我也呆呆的按它提(wu)示(dao)的做,在各大论坛求助方法。各大论坛的dalao也耐心分(hu)享(you)解决方法。
然后给出选用的方法,这种方法采用conda安装binstar
- conda install --channel https://conda.anaconda.org/menpo opencv3
然后查一下安装结果:
- anaconda show menpo/opencv3
然后就成功了