在我添加之前,我一直在成功地将 cv2 与 anaconda 一起使用:
cv2.waitKey(0)
收到此错误:
cv2.error: -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp:562: 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 cvWaitKey
我在 Ubuntu 14.04.2 LTS 上使用 conda 3.14.0 和错误中的包 建议安装
最佳答案
此链接可能对您有所帮助。 https://groups.google.com/a/continuum.io/forum/m/#!msg/anaconda/uHB2wYT29vU/80ywinE9BAAJ .
综上所述,您可以尝试:
对于 opencv2.X
conda install -c https://conda.anaconda.org/menpo opencv
关于python-2.7 - 为什么 cv2.waitkey 函数在 ubuntu 上使用 conda 会导致错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31699935/