But when I type python-v I am not able to get the python version. I think I am missing packages maybe. Kindly have a look at the attached image and let me know how to fix the problem.
again your trying to run shell commands inside the python interpreter. open Windows Terminal with either cmd or powershell and the command should work.
cmd, powershell and python are all different programs and expect different inputs. when you open Python 3.12.7 (64 bit) your running a python interpreter. This will only understand python code.
python D:\python_projects\hello.py is a shell command which only cmd or powershell will understand.
The python program is for running python code. cmd and powershell are for running other programs.
RealPython have a explainer which should help you.