Skip to content
Latchkey

GitHub Actions setup-python "Version not found for this OS/arch"

actions/setup-python could not provide the requested Python - the version has no prebuilt binary for the runner OS/arch, or YAML parsed an unquoted version like 3.10 as the number 3.1.

What this error means

The Setup Python step fails with "Version 3.10 not found" (or a similar spec), often because the value was read as 3.1, or no prebuilt exists for the runner architecture.

Actions log
Error: Version 3.1 with arch x64 not found
# python-version: 3.10 was parsed as the number 3.1

Common causes

Unquoted version coerced by YAML

python-version: 3.10 is read as the float 3.1. It must be quoted ("3.10") so the trailing zero is preserved.

No prebuilt for this OS/arch

A specific patch or an older release may have no python-versions prebuilt binary for the runner, especially on arm64 or macOS, so setup-python cannot install it.

How to fix it

Quote the version string

Always quote python-version so YAML does not coerce it to a number.

.github/workflows/ci.yml
- uses: actions/setup-python@v5
  with:
    python-version: '3.10'

Use an available version for the runner

  1. Pick a version that has a prebuilt for the runner OS/arch, or set allow-prereleases / a broader range.
  2. On arm64, confirm the requested version is published for that architecture.
  3. Re-run if the failure was a transient download of the Python build.

How to prevent it

  • Always quote python-version values to avoid float coercion.
  • Check prebuilt availability for the runner architecture before pinning.
  • Prefer a major.minor range over an exact unverified patch.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →