python-poetry/poetry · error · PythonDownloadNotFoundError

No suitable standalone build found for the requested Python

Error message

No suitable standalone build found for the requested Python version.

What it means

Raised as PythonDownloadNotFoundError in PythonInstaller.version when pbs_installer.get_download_link() raises ValueError - i.e. the python-build-standalone backend has no standalone build for the requested version/implementation/free-threaded combination. The property is consulted before any download is attempted.

Source

Thrown at src/poetry/utils/env/python/installer.py:64

    implementation: Literal["cpython", "pypy"] = dataclasses.field(default="cpython")
    free_threaded: bool = dataclasses.field(default=False)
    installation_directory: Path = dataclasses.field(
        init=False, default_factory=lambda: Config.create().python_installation_dir
    )

    @property
    def version(self) -> Version:
        try:
            pyver, _ = pbi.get_download_link(
                self.request,
                implementation=self.implementation,
                free_threaded=self.free_threaded,
            )
            return Version.from_parts(
                major=pyver.major, minor=pyver.minor, patch=pyver.micro
            )
        except ValueError:
            raise PythonDownloadNotFoundError(
                "No suitable standalone build found for the requested Python version."
            )

    def exists(self) -> bool:
        version = self.version
        bad_executables = set()

        for python in Python.find_poetry_managed_pythons():
            try:
                if python.implementation.lower() != self.implementation:
                    continue
                if python.free_threaded != self.free_threaded:
                    continue

                if version == python.version:
                    return True
            except CalledProcessError:
                bad_executables.add(python.executable)

View on GitHub (pinned to 92b74dcfe3)

Solutions

  1. Pick a version that has a published python-build-standalone release (check the project's release page).
  2. Drop the unsupported flag: omit free_threaded=True or use implementation="cpython".
  3. Update pbs_installer (the backend library) so its index knows newer builds: 'pip install -U pbs-installer'.
  4. Use a system/pyenv interpreter instead of a Poetry-managed one for exotic versions.

Example fix

// before
PythonInstaller(request="3.99", free_threaded=True).install()
# get_download_link ValueError -> PythonDownloadNotFoundError

// after
PythonInstaller(request="3.12").install()
Defensive patterns

Strategy: validation

Validate before calling

import pbs_installer as pbi

def version_has_download(request: str, implementation="cpython", free_threaded=False) -> bool:
    try:
        pbi.get_download_link(request, implementation=implementation, free_threaded=free_threaded)
        return True
    except ValueError:
        return False

Type guard

from poetry.utils.env.python.installer import PythonDownloadNotFoundError, PythonInstallerError

def is_python_download_not_found(e: Exception) -> bool:
    return isinstance(e, PythonDownloadNotFoundError) or isinstance(e, PythonInstallerError)

Try / catch

from poetry.utils.env.python.installer import PythonDownloadNotFoundError

try:
    PythonInstaller(request=req).install()
except PythonDownloadNotFoundError:
    # pick the latest known-good version instead
    req = latest_known_python_version()
    PythonInstaller(request=req).install()

Prevention

When it happens

Trigger: Constructing PythonInstaller(request="3.99", ...) or with implementation="pypy" / free_threaded=True combos that pbs_installer cannot resolve; requesting a version newer than any published build; a typo'd version string. Exact catch: installer.py:54-66.

Common situations: Asking 'poetry python install 3.14' before a build is published; requesting a free-threaded (nogil) build for a version that has none; requesting pypy for a version python-build-standalone doesn't ship; offline/mirror with stale index.

Related errors


AI-assisted analysis of python-poetry/poetry@92b74dcfe3 (2026-08-04). Data as JSON: /data/errors/f81201323bad34d7.json. Report an issue: GitHub.