ubuntu下anaconda中安装opencv无法使用cv2.imshow等

ubuntu下anaconda中安装opencv无法使用cv2.imshow等

错误提示:

error:
/tmp/build/80754af9/opencv_1512687413662/work/modules/highgui/src/window.cpp:611:
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 cvShowImage

解决方法

在pycharm中相应环境terminal下
conda remove opencv
conda install -c menpo opencv
pip install --upgrade pip
pip install opencv-contrib-python
ubuntu下anaconda中安装opencv无法使用cv2.imshow等