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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help