[Python] UsePythonVersion0 error in self hosted runner on windows

Discussão em 'Python' iniciado por Stack, Agosto 27, 2025.

  1. Stack

    Stack Membro Participativo

    Following is the code in my yml file.

    - task: UsePythonVersion@0
    inputs:
    versionSpec: '3.x'
    addToPath: true
    architecture: 'x64'


    [​IMG] I am using DevOps on self-hosted runner installed on windows 10. Getting following error:


    ##[error]Failed to download Python from the Github Actions python registry (github.com/actions/python-versions). Error: Error: The process 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' failed with exit code 1 ##[error]Version spec 3.12 for architecture x64 did not match any version in Agent.ToolsDirectory.
    ​

    There is python-3.12.5-amd64.exe in C:\agent_work_tool\Python\3.12.5\x64 directory.

    Continue reading...

Compartilhe esta Página