Ubuntu conda下使用opencv报错:If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config

首先需要安装这两个包:

sudo apt-get install libgtk2.0-dev pkg-config

如果还是报错的话:

解决方法1:

https://stackoverflow.com/questions/28776053/opencv-gtk2-x-error

解决方法2(亲测有效):

pip install opencv-contrib-python

 

你可能感兴趣的:(ubuntu)