Skip to content

Installation of Python 3.12.x not completing #13510

@jsloan117

Description

@jsloan117

Description

The issue is occurring within the "setup.ps1" script from the extracted zip file. For some reason it gets all files in the install directory (appears to be only in version 3.12.10 x64 & x86 (maybe 3.12.x)) and does nothing with this information.

Our build pipelines have a 10 hour timeout and its taken up most of that time and never completes. Our last successful build was 12/16/2025.

Since these three lines appear to only exist in v3.12.x I created a workaround to remove those lines shown below.

Write-Host "Invoke installation script..."
    Push-Location -Path $assetFolderPath
    if ($ReleaseAsset.filename -like "python-3.12.*") {
        Write-Host "Python 3.12 detected, performing setup.ps1 hack"
        $setupFile = ".\setup.ps1"
        $setupContent = Get-Content $setupFile

        $cleanedContent = $setupContent | Where-Object {
            $_ -notmatch 'Files in \$PythonArchPath' -and
            $_ -notmatch 'Get-ChildItem -Path \$PythonArchPath -File -Recurse' -and
            $_ -notmatch 'Write-Output \$files'
        }

        Set-Content -Path $setupFile -Value $cleanedContent -Encoding UTF8
    }
    Invoke-Expression .\setup.ps1
    Pop-Location

This not only appears to be completely useless by removing it, we save a decent amount of time. I'm opening this for a wider audience is aware of this possible problem and to see if this fix/hack might be good for the repo as a whole. This may affect 2025 untested currently.

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 22.04
  • Ubuntu 24.04
  • Ubuntu Slim
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • macOS 26 Arm64
  • Windows Server 2019
  • Windows Server 2022
  • Windows Server 2025

Image version and build link

NA

Is it regression?

Unsure

Expected behavior

For the build to complete without issues.

Actual behavior

Build never completes and times out.

Repro steps

Build a Windows 2022 image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions