我通过Anaconda发行版使用Python 3.4.他们似乎没有OpenCV的Python 3.4绑定.我尝试从源头使用Cmake,但无济于事.有人可以帮我安装OpenCV for Python 3.4.x吗?
有很多关于此的教程和问题(关于SO)。
这似乎回答了你的问题。编辑:转载如下:
1) Download OpenCV from http://opencv.org/downloads.html and extract
2)From the extracted folder, copy the file from the extracted directory:
opencv/build/python/2.7/(either x86 or x64, depending on your Anaconda
version)/cv2.pyd to your Anaconda site-packages directory, e.g.,
C:\Anaconda\Lib\site-packages
3)To get ffmpeg within opencv to work, you'll have to add the directory
that ffmpeg is located in to the path (e.g., opencv/sources/3rdparty
/ffmpeg). Then you'll have to find the dll in that folder (e.g.,
opencv_ffmpeg_64.dll) and copy or rename it to a filename that includes
the opencv version you are installing, (e.g., opencv_ffmpeg249_64) for
2.4.9.
Run Code Online (Sandbox Code Playgroud)
{复制结束}
EDIT2:OpenCV 不支持 Python 3.x,除了 OpenCV 3.0 版本(仍处于实验阶段,处于测试阶段)。从下载网站下载3.0版本并尝试一下。(感谢这个问题)。
最后,我将引导您阅读有关如何安装它的文档教程。
祝你好运!