GitHub Actions setup-python "Version not found" from a version file
setup-python can read the version from a file via python-version-file. If that file is missing, empty, or holds an unavailable version, the action cannot resolve a Python to install.
What this error means
The setup-python step fails to find a version when configured with python-version-file, because the referenced file is absent or specifies a version not available on the runner.
github-actions
Error: The version '3.13.99' with arch 'x64' was not found for UbuntuCommon causes
Version file missing or empty
The python-version-file path does not exist after checkout, or contains no usable version.
Version not available for the runner
The file pins a Python version that the runner image does not provide.
How to fix it
Point at a valid version file or pin directly
- Commit a .python-version (or use pyproject.toml) with an available version.
- Or set python-version directly to a supported value.
- Run checkout before setup-python so the file exists.
.github/workflows/ci.yml
- uses: actions/setup-python@v5
with:
python-version-file: '.python-version'How to prevent it
- Commit a valid version file and keep it current.
- Pin versions that the runner image actually offers.
- Checkout before setup-python so the version file is present.
Related guides
GitHub Actions setup-python "Version not found for this OS/arch"Fix actions/setup-python "Version X not found" - a patch with no prebuilt binary, the wrong runner architectu…
GitHub Actions actions/setup-go "Could not find a version that satisfied"Fix actions/setup-go failing to resolve a Go version - a too-specific or non-existent go-version, a missing g…
GitHub Actions "Dependencies lock file is not found" (setup-node cache)Fix GitHub Actions "Dependencies lock file is not found" from setup-node caching - the action could not locat…