>import cv2 'import' is not recognized as an internal or external command, operable program or batch file

As a new user, I need some help.
Python and opencv have been installed on my PC.
Following the “Reading an image” tutorial, the various checks at the start of the article show the software is installed correctly because the version numbers are displayed on command.
However, “>import cv2
‘import’ is not recognized as an internal or external command,
operable program or batch file.” is the error message I get.
Why?
What have I done wrong?

You are trying to execute a line of Python code in Windows console. There you can only execute full Python scripts in .py files. Python code can be executed interactively inside a Python shell.

You need to find a Python tutorial and learn the basics of how to program with Python.

https://www.google.com/search?q=‘import’+is+not+recognized+as+an+internal+or+external+command%2C+operable+program+or+batch+file

Thank you, that subtly is now clearer.

I was using such a tutorial. You would have expected that to be mentioned by the ‘expert’, wouldn’t you?