此问题之前已被问过,但它的答案并不适用于我。
$ python video.py
输出:
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
/home/aunmesh/project-infinity/sirius-application/opencv-2.4.9/modules/highgui/src/window.cpp,
line 483 Traceback (most recent call last): File "video.py", line 3,
in <module>
cv2.namedWindow("preview") cv2.error: /home/aunmesh/project-infinity/sirius-application/opencv-2.4.9/modules/highgui/src/window.cpp:483:
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
路径"/home/aunmesh/project-infinity/sirius-application/opencv-2.4.9/modules/highgui/src/window.cpp:483"
不再存在,因为我删除了它,并在另一个目录中重新安装了opencv 3.0.0:
/home/aunmesh/opencv-master/
。
也许某些路径变量或配置设置有误。请告诉我如何解决这个问题(我认为python正在查看文件夹的错误位置)