How to install OpenCV for Python 3.4?

I am using Python 3.4 through the Anaconda distribution. They don't seem to have Python 3.4 bindings for OpenCV. I tried to use Cmake at the source, but to no avail. Can someone help me install OpenCV for Python 3.4.x?

+7
python opencv
source share
2 answers
conda install -c menpo opencv3 

There is a trick. However, you must install anaconda.

+7
source share

There are a lot of tutorials and questions about this (on SO).

This seems to answer your question. Change Reproduced below:

 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, eg, 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 (eg, opencv/sources/3rdparty /ffmpeg). Then you'll have to find the dll in that folder (eg, opencv_ffmpeg_64.dll) and copy or rename it to a filename that includes the opencv version you are installing, (eg, opencv_ffmpeg249_64) for 2.4.9. 

{End of breeding}

EDIT2 : OpenCV does not support Python 3.x, except OpenCV version 3.0 (still experimental, in beta). Download version 3.0 from the download site and try this. (Thanks to this question ).

A question with a possible hint if the previous one does not work.

And finally, I will tell you to read the tutorial on how to install it.

Good luck

+3
source share

All Articles