Recently, I have installed a current version of Python(x,y) package (2.7.6.0) and now when I run my python code, it shows an error:
Traceback (most recent c
the following worked for me. Assuming that Python(X,Y) is installed (and the option for OpenCV was checked at the beginning of the installation), I did the following steps:
For programmers using python 3, download a wheel package in order to install OpenCV.
You will need to make sure that NumPy is already installed. Anaconda is a nice package to handle dependencies. You would get numpy out of the box with it.
Then, download the OpenCV version corresponding to your Python installation version from : http://www.lfd.uci.edu/~gohlke/pythonlibs/
You can find the version of your Python interpreter by running:
python --version
In my case as I run C-Python 3.5, I chose : opencv_python‑3.2.0‑cp35‑cp35m‑win_amd64.whl
Finally, in the directory you have downloaded the wheel package, run:
pip install opencv_python-3.X.X-cpXX-cpXXm-xxxx.whl
I had the same problem and when i use ipython [just write ipython at cmd if you have ipython installed] it works.
Try this: Install opencv for windows. download it at here :
http://sourceforge.net/projects/opencvlibrary/files/opencv-win/2.4.1/OpenCV-2.4.1.exe/download
Then
Copy cv2.pyd from C:\opencv\build\python\x86\2.7\ and paste it in the folder python site-packages folder . restart your IDE.
Make sure numpy is installed. If not , get it from here ..
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy