I came across the same problem. Here is what I did:
- Unzip the OpenCV distribution into a folder, for example:
C:\RPS\python\epd32 - Open a text editor and create a single-line file containing the full path where you installed OpenCV + the subdirectory in which the python bundle lives, for example:
C:\RPS\python\epd32\opencv\build\python\2.7 . Save this .pth file in the folder with packages of user sites Enthought Canopy, for example: C:\Users\rsignell\AppData\Local\Enthought\Canopy32\User\Lib\site-packages\opencv.pth
Open Enthought Canopy and try import cv2 . Now it should work!
I do it this way because I like to have the whole OpenCV distribution in my system, with examples and other things.
But if you don't want the whole OpenCV distribution to freeze, you can also just copy <opencv>\build\python\2.7\cv2.pyd to the site-packages directory and then delete the directory into which OpenCV unpacked everything.
To avoid extracting everything, you can open opencv.exe with something like 7-zip (open inside) and extract only <opencv>\build\python\2.7\cv2.pyd in the site-packages directory.
source share