Mukesh Bharsakle
Mukesh Bharsakle

Reputation: 443

Use Python version v0 task fails in azure pipeline

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

I get the following error on ubuntu18.04:

##[error]Version spec 3.x for architecture x64 did not match any version in Agent.ToolsDirectory.

Upvotes: 2

Views: 1065

Answers (1)

Kim Xu-MSFT
Kim Xu-MSFT

Reputation: 2196

There's a known issue when using Python 3.6 on Ubuntu-latest (recently upgraded to default version 22.04): Issue

There are no tarballs for 22.04 for any python 3.6.* versions. Check this link for pre-installed software for 22.04.

I am facing same error when using Python 3.6.x on Ubuntu-latest.

enter image description here

You could specify the image to Ubuntu-20.04 to use Python 3.6.x.

enter image description here

Or use Python 3.10.x on Ubuntu-latest image.

enter image description here

Upvotes: 1

Related Questions