Setting Up Side-by-Side Python Versions on Azure DevOps Self-Hosted Agents
dev.to·3h·
Discuss: DEV
Flag this post

Setting Up Side-by-Side Python Versions on Azure DevOps Self-Hosted Agents

You’ve set up an Azure DevOps self-hosted agent and need Python for your pipelines. You install Python, configure your pipeline with UsePythonVersion@0, and the job fails - the agent can’t find it.

The ADO documentation isn’t clear on how to properly set up Python so the agent can use it, especially when you need multiple versions side-by-side. This guide shows you exactly how to do it using uv and symlinks.

The Problem

ADO agents won’t use your system-installed Python. The UsePythonVersion task only looks in _work/_tool/Python/ with this exact structure:

_work/_tool/
└── Python/
├── 3.12.12/
│   ├── x64/
│   │   └── bin/
│   └── x64.complete
└── 3.12/
├── x64/
│   └── bin/
└── x64.compl...

Similar Posts

Loading similar posts...