I'm on a Raspberry Pi Zero W running Buster, and I installed OpenCV following this walkthrough. I can successfully import the module from an IPython session:
~ $ python
Python 3.7.3 (default, Jul 25 2020, 13:03:44)
[GCC 8.3.0] on linux
Type "help", "copywrite", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'4.1.0'
>>>
However, when I try to run scripts that import the module, I get an error:
~ $ python helloworld.py
Traceback (most recent call last):
File "helloworld.py", line 1, in <module>
import cv2 as cv
ModuleNotFoundError: No module named 'cv2'
Anyone know what's going on here? I'm up a creek as far as troubleshooting Linux filesystem issues goes, so any insight would be appreciated.
Edit: I forgot to mention that this Pi is being used as an embedded system, so I didn't bother setting up a virtual environment as recommended in the linked tutorial. Everything is running in the home environment.