Add the path of python folder in environmental variable and it will work
1.search environmental variable
2.look for system variable section and find variable named path in it
3.double click on path and add new path which directs towards python folder and that's it.
the python folder is usually in C:\Users["user name"]\AppData\Local\Programs\Python\Python39