As far as I can tell I've successfully installed opencv (in two different ways) yet continue to get the error message
ModuleNotFoundError: No module named 'cv2'
First I tried using cmd (ran as administrator)
pip install cv2
I don't recall why that didn't work but found this.
I'm running Windows 7 32-bit and have Python 3.7 installed. So I chose:
opencv_python‑4.1.0‑cp37‑cp37m‑win32.whl
from here but got the message:
Error opencv_python.....whl is not a supported wheel on this platform.
Then based on this I tried this:
pip install opencv-contrib-python
That successfully installed.
But when I ran the following (in Jupyter):
import cv2
I get the error
ModuleNotFoundError: No module named 'cv2'.
Having no idea why I got the error, in desperation I tried installing other wheels from https://www.lfd.uci.edu/~gohlke/pythonlibs/, chosing older versions from the initial one I failed to install.
I finally succeeded in installing this one:
opencv_python-4.1.0-cp36-cp36m-win32.whl
So I went back to Jupyter and re-attempted to import cv2 but got the same error message.
I tried restarting the Jupyter kernel and even restarting my laptop to no avail.
I've scanned through other SO threads with the same error listed and tried what was suggested - e.g. one thread (can't find it to copy the link here) had the suggestion to try:
conda create --name opencv-env python=3.7
but I got:
Fetching package metadata ............. PackageNotFoundError: Package not found: Conda could not find '
I'm out of ideas. Any suggestions out there?