You need to set up the path variable.
- To do this, you should first Install python. Here is the link that will take you to the official website from where you can download python https://www.python.org/downloads/
- After this, install it on your PC. Look for the location where PYTHON has been installed on your PC using the following command on your command prompt: cmd python.
- Then go to advanced system settings and add new variable and name it as PYTHON_NAME and paste the copied path.
- Look for the path variable, select it's value and select edit
- Add a semicolon towards the end of the value if it's not present and then type %PYTHON_HOME%
This should solve the error.