GitHub Actions: setup-python's "The version ... with architecture 'x64' was not found"
actions/setup-python installs a ready-made Python built for the runner's exact operating system version and processor. It looks in the runner's tool cache first, then in the list of builds that GitHub publishes in actions/python-versions. It does not compile Python or try any other source, so when neither has the version you asked for, the step fails.
What it looks like
From a public run on ubuntu-26.04 on October 29, 2026, with python-version: 3.9:
Version 3.9 was not found in the local cache ##[error]The version '3.9' with architecture 'x64' was not found for Ubuntu 26.04. The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
- The first line is normal: it appears whenever setup-python has to download. When a build exists, the next line is "Version ... is available for downloading" instead of the error.
- The end of the error names the system as setup-python sees it: "Ubuntu 26.04", "macOS 26.6.2", "Windows 2025" on
windows-latest, "Windows Enterprise" onwindows-11-arm(it takes the fourth word of the Windows name), or "Debian 13" on a self-hosted runner. - If it started without any change to your workflow, the job probably landed on Ubuntu 26.04:
ubuntu-latesthas been moving there since October 19 (ubuntu-latest moving to Ubuntu 26.04).
Which versions each runner has
From versions-manifest.json on November 3, 2026:
- Ubuntu 26.04 (
ubuntu-26.04,ubuntu-26.04-arm, andubuntu-latestafter the move): nothing before 3.10, and only recent patch releases: 3.10.20 to 3.10.22, 3.11.15 to 3.11.18, 3.12.13 to 3.12.16, 3.13.13 to 3.13.18 and 3.14.6 to 3.14.10. Even an exact pin of a recent version, such as3.14.3, fails there (hass-config #1150). - Ubuntu 24.04 and 22.04: 3.8 from 3.8.12, 3.9 from 3.9.12 and 3.10 from 3.10.4, up to the newest. Of the two, only 22.04 has Python 3.7, and only on x64.
- Windows (
windows-latest) and Apple silicon Macs (macos-latest,macos-15,macos-26): the older versions stop at 3.8.10, 3.9.13, 3.10.11, 3.11.9 and 3.12.10, the last releases that CPython published installers for. Later ones are security releases published as source code only, so3.12.12fails on Windows (openHornedRat #463) and3.12.15on macOS (PersonalClaw #4758). Apple silicon has no 3.7 at all (dcc-mcp-core #2776). - Windows on Arm (
windows-11-arm): 3.11 and later only (MaterialX #3110). - Self-hosted runners: Linux builds exist only for Ubuntu releases and for RHEL 9 and 10 on x64, so on Debian even
3.xfails (Morrison-Lab/gha #1205).
So for 3.10, 3.11 and 3.12, no single patch release exists on both Ubuntu 26.04 and Windows. A matrix that pins 3.12.10 everywhere fails on Ubuntu 26.04, and one that pins 3.12.13 fails on Windows and macOS.
To see the list for a runner yourself (platform is linux, darwin or win32; arch is x64 or arm64; macOS and Windows have no platform_version):
gh api repos/actions/python-versions/contents/versions-manifest.json \
-H "Accept: application/vnd.github.raw+json" \
--jq '.[] | .version as $v | .files[]
| select(.platform == "linux" and .platform_version == "26.04" and .arch == "x64")
| $v'
Ask for the minor version
Write "3.12", not "3.12.8" (blueprintx #945). setup-python then takes the newest build of 3.12 on each runner. The same goes for a .python-version file, which setup-python reads when python-version is not set.
- uses: actions/setup-python@v7
with:
python-version: "3.12"
Keep the quotes. Unquoted, YAML reads 3.10 as the number 3.1, and the error then says '3.1' (kg-microbe #1056).
Run the old version on a runner that has it
Python 3.8 and 3.9 still have builds for ubuntu-24.04, and 3.7 for ubuntu-22.04 and the Intel Mac images, such as macos-15-intel. One public project's matrix now does exactly that (EliahKagan/version #40). For one old version, an expression in runs-on is enough:
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.python-version == '3.9' && 'ubuntu-24.04' || 'ubuntu-latest' }}
Install it with uv instead
uv downloads its own Python builds, which are not tied to a release of Ubuntu. Its list includes 3.8 up to 3.8.20 and 3.9 up to 3.9.25 for Linux, macOS and Windows on x64, but not 3.7. On November 1, a public job on ubuntu-26.04 got 3.8 this way and downloaded cpython-3.8.20-linux-x86_64-gnu (pyrs-yaml #696).
- uses: astral-sh/setup-uv@v10.3.3
with:
python-version: "3.9"
activate-environment: true
- run: uv pip install -r requirements.txt
- run: python -m pytest
The environment uv creates has no pip, so install with uv pip install rather than pip install.
Telling it apart
- "Version ... was not found in the local cache" followed by a download: this is not an error, and the step goes on.
- The error adds "Free threaded versions are only available for Python 3.13.0 and later.": you asked for a free-threaded build, such as
3.12t, of a version that has none. - setup-python succeeded and a later step fails because a package no longer supports that Python: the runner is fine, and the fix is in your dependencies.
See failed jobs from IntelliJ IDEA
Pipeline Inbox for GitHub Actions Workflows, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the runs of all your repositories in an IDE tool window, with their jobs and steps, so one matrix leg that failed at setup stands out, and your current branch's runs are in the status bar. Reading is free; re-running failed jobs, cancelling, running workflows and reviewing deployments are Pro (US$1.50 a month, with a 30-day trial).
GitHub and GitHub Actions are trademarks of GitHub, Inc.; IntelliJ IDEA is a trademark of JetBrains s.r.o.; Python is a registered trademark of the Python Software Foundation. This page is not affiliated with, sponsored or endorsed by GitHub, Inc., JetBrains or the Python Software Foundation.
More: ubuntu-latest moving to Ubuntu 26.04 · "Unable to resolve action" · The "Node.js 20 is deprecated" warning · GitHub Actions plugins for IntelliJ IDEA compared · 日本語