2

I have Installed Python 3 (32bit) on Windows.

My error screen is here I have read this answer, but I can't install cv2 using pip install opencv_python-3.4.1-cp37-cp37m-win32.whl and it gives error as

opencv_python-3.4.1-cp37-cp37m-win32.whl is not a supported wheel on this platform.

when I tried Python shell, and run the command import cv2 it doesn't give error, but when I try it as import cv2 in IDLE terminal, then It gives error as

>>> import cv2
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'
GD- Ganesh Deshmukh
  • 1,456
  • 3
  • 24
  • 36
  • Possible duplicate of [Installed OpenCV but no module found "cv2" in IDLE](https://stackoverflow.com/questions/41132864/installed-opencv-but-no-module-found-cv2-in-idle) – GPPK Mar 27 '18 at 15:35

2 Answers2

3

You could also install opencv in these three easy steps

  1. Type py -m pip install opencv-python
  2. In the same window type python or open IDLE python.
  3. Now type import cv2. there you go... simple and easy i hope it helps.
Yogesh kataria
  • 1,605
  • 16
  • 20
1

1)Download OpenCV from here

2)Extract the zip file to Root drive(mostly 'C'Drive)

3)Goto folder opencv\build\python\2.7\x86 and copy cv2 file to your main Python directory,

in my case Python directory is

C:\Users\Deshmukh Brothers\AppData\Local\Programs\Python\Python36-32\Lib\site-packages

and paste cv2 file there.

4)Run command as python -m idlelib and now it will prompt idle-shell.

5)now it will work as import cv2, it nothing occurred and cursor went to next line then it is successfully installed.

GD- Ganesh Deshmukh
  • 1,456
  • 3
  • 24
  • 36