'VScode Extension Code Runner not working/error (python) when I run program

When I installed the code runner extension and I can't run the python program this error popped up:

[![Image][1]][1]

Copyright © Microsoft Corporation. All rights reserved. 
Try the new cross-platform PowerShell https://aka.ms/pscore6 
Warning: PowerShell detected that you might be using a screen-reader and has disabled PSReadLine for compatibility purposes. 
If you want to re-enable it, run 'Import - Module PSReadLine'. 
PS C:\Users\Admin\OneDrive\Máy tính\py projects python -u " C\Users\ Admin\OneDrive\Máy tính\py project\test.py " python : The term 'python' is not recognized as the name of a cmdlet , function ,script file ,or operable program. Check the spelling of the name ,or if a path was included ,verify that the path is correct and try again. 
At line :1 char :1 
+ python -u " C:\Users\Admin\OneDrive\Máy tính\py project\test.py "  ' ~~~~~~
+ CategoryInfo : ObjectNotFound: (python:String) [], CommandNotException
+ FullyQualifiedErrorId : CommandNotFoundException

When I turned off the extension the code run normally, but when I turned on the error pop up. Thank you for reading my problem! ( •̀ ω •́ )✧ [1]: https://i.stack.imgur.com/62MI3.png



Solution 1:[1]

What means "turn off the extension its working normal". According to the error report, this should be a problem with your Python environment variable setting. Have you tried the way named "Run Python File"? This is a function in extension pylance.

By the way, You should have installed the python extension.

enter image description here

updates:

enter image description here

You can use this option to run your python file. This is the file running option officially provided by Microsoft.

Solution 2:[2]

Make sure you have python installed. IN the bottom left of VScode you have to pick an interpreter and make sure you select python. If you need to select your language, select python, and also name your file "FileName.py".

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Dylan Coleman