opencv该功能未实现

我使用anaconda3并在ipython Notebook中编写代码。这是我的代码:


import cv2

if __name__ == '__main__':

    img1 = cv2.imread("./frame1.jpg")

    cv2.imshow('show', img1)

我收到此错误:


error: OpenCV(3.4.1) /opt/conda/conda-bld/opencv-suite_1527005194613/work/modules/highgui/src/window.cpp:636: 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

我已经有libgtk2.0-dev和pkg-config,我也已经opencv从水蟒离开了。后来我opencv用conda install安装了。但这没有帮助。


梦里花落0921
浏览 154回答 2
2回答

慕村225694

opencv提供的版本pip不会产生此错误。在您的conda环境中,用于pip安装opencv:pip install opencv-python

缥缈止盈

也许anaconda软件包没有highgui库。尝试安装系统opencv库。apt install opencv
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python