I spent about 15 hours getting Opencv 2.4.8 to work with Python 2.7.5 in my Windows 7 Cygwin-64 environment.
After some struggle, I finally managed to get Opencv to work with C ++, but I still can't name Opencv from Python,
This is what I get when I try to import the cv2 module:
$ python
Python 2.7.5 (default, Oct 2 2013, 22:34:09)
[GCC 4.8.1] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named cv2
>>>
During the installation (with cmake-gui) of Opencv, all configuration entries related to Python were correctly defined.
I added the path to opencv / bin for my PATH.
I copied the cv2.pyd file from the opencv distribution to the folder with the Python installation folders, but to no avail.
I tried installing PYTHONPATH to specify the directory of the site directories, but this does not help.
It seems to me that Python does not know about the cv2 module.
, , . , - , Python -Python-, .pyd -, .
.