Python not working in Azure pipeline build VM

Zaid Abu-Hijleh 1 Reputation point
2022-05-24T15:30:59.913+00:00

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:

205193-image.png

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:

205194-image.png

Any idea as to why this is happening and what I should do to fix it?

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,251 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. vipullag-MSFT 24,441 Reputation points
    2022-05-25T02:57:40.847+00:00

    @Zaid Abu-Hijleh

    Welcome to Microsoft Q&A Platform, thanks for posting your query here.

    Azure DevOps related queries/issues are currently not supported on this Microsoft Q&A platform. Please check this supported products list here (more to be added later on).

    I would request you to please post your queries in dedicated forums as in below links:
    https://developercommunity.visualstudio.com/spaces/21/index.html
    https://developercommunity.visualstudio.com/t/get-unique-id-from-devops-organization/756710
    https://stackoverflow.com/questions/tagged/azure-devops

    Hope that helps.
    Please 'Accept as answer' if it helped, so that it can help others in the community looking for help on similar topics.

    0 comments No comments