一、完整报错

cv2.error: OpenCV(3.4.2) /tmp/build/80754af9/opencv-suite_1535558553474/work/modules/highgui/src/window.cpp:632: error: (-2: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 function 'cvShowImage'

二、原因分析

conda安装的opencv太过简洁

三、解决办法

无需卸载原来的opencv,直接在该程序的运行环境下,再次安装opencv:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ opencv-contrib-python

在这里插入图片描述

参考链接

  1. 【已解决】python下opencv遇到问题:cv2.error: OpenCV(3.4.2) /tmp/build/80754af9/opencv-suite_1535558553474/work/
Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐