conda环境中使用opencv时,可能会报以下错误:
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'折腾了大半天,终于从stack overflow中找到了解决办法,超级简单,记录一下
首先conda环境中使用pip安装opencv-python
pip install opencv-python然后安装pencv-contrib-python
pip install opencv-contrib-python 版权声明:本文为weixin_36670529原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。