Im trying to run a python script in an Azure pipeline, but it doesnt seem to be working. It keeps telling me 'python' is not recognized as an internal or external command, operable program or batch file. I have installed python and added it to the path, when I type python in the command line on the VM it works:

But when I try to run the following command line task in the pipeline, it fails:
- task: CmdLine@2
inputs:
script: 'python ./tools/setPythonClientVersion.py $(Build.BuildNumber)'
displayName: Set Client Version
I get the following error:
Any idea as to why this is happening?
