淘先锋技术网

首页 1 2 3 4 5 6 7

报错如下:

cv2.error: OpenCV(4.4.0) /tmp/pip-req-build-dglzv4yn/opencv/modules/highgui/src/window.cpp:651: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa 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’

谷歌搜索出解决方案:

首先conda环境中使用pip安装opencv-python:

pip install opencv-python

然后安装pencv-contrib-python:

pip install pencv-contrib-python