{"id":"f81201323bad34d7","repo":"python-poetry/poetry","slug":"no-suitable-standalone-build-found-for-the-request","errorCode":null,"errorMessage":"No suitable standalone build found for the requested Python version.","messagePattern":"No suitable standalone build found for the requested Python version\\.","errorType":"exception","errorClass":"PythonDownloadNotFoundError","httpStatus":null,"severity":"error","filePath":"src/poetry/utils/env/python/installer.py","lineNumber":64,"sourceCode":"    implementation: Literal[\"cpython\", \"pypy\"] = dataclasses.field(default=\"cpython\")\n    free_threaded: bool = dataclasses.field(default=False)\n    installation_directory: Path = dataclasses.field(\n        init=False, default_factory=lambda: Config.create().python_installation_dir\n    )\n\n    @property\n    def version(self) -> Version:\n        try:\n            pyver, _ = pbi.get_download_link(\n                self.request,\n                implementation=self.implementation,\n                free_threaded=self.free_threaded,\n            )\n            return Version.from_parts(\n                major=pyver.major, minor=pyver.minor, patch=pyver.micro\n            )\n        except ValueError:\n            raise PythonDownloadNotFoundError(\n                \"No suitable standalone build found for the requested Python version.\"\n            )\n\n    def exists(self) -> bool:\n        version = self.version\n        bad_executables = set()\n\n        for python in Python.find_poetry_managed_pythons():\n            try:\n                if python.implementation.lower() != self.implementation:\n                    continue\n                if python.free_threaded != self.free_threaded:\n                    continue\n\n                if version == python.version:\n                    return True\n            except CalledProcessError:\n                bad_executables.add(python.executable)","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/python-poetry/poetry/blob/92b74dcfe348d0e01e14d40d6c1fa47a4ee04a54/src/poetry/utils/env/python/installer.py#L46-L82","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Pick a version that has a published python-build-standalone release (check the project's release page).","Drop the unsupported flag: omit free_threaded=True or use implementation=\"cpython\".","Update pbs_installer (the backend library) so its index knows newer builds: 'pip install -U pbs-installer'.","Use a system/pyenv interpreter instead of a Poetry-managed one for exotic versions."],"exampleFix":"// before\nPythonInstaller(request=\"3.99\", free_threaded=True).install()\n# get_download_link ValueError -> PythonDownloadNotFoundError\n\n// after\nPythonInstaller(request=\"3.12\").install()","handlingStrategy":"validation","validationCode":"import pbs_installer as pbi\n\ndef version_has_download(request: str, implementation=\"cpython\", free_threaded=False) -> bool:\n    try:\n        pbi.get_download_link(request, implementation=implementation, free_threaded=free_threaded)\n        return True\n    except ValueError:\n        return False","typeGuard":"from poetry.utils.env.python.installer import PythonDownloadNotFoundError, PythonInstallerError\n\ndef is_python_download_not_found(e: Exception) -> bool:\n    return isinstance(e, PythonDownloadNotFoundError) or isinstance(e, PythonInstallerError)","tryCatchPattern":"from poetry.utils.env.python.installer import PythonDownloadNotFoundError\n\ntry:\n    PythonInstaller(request=req).install()\nexcept PythonDownloadNotFoundError:\n    # pick the latest known-good version instead\n    req = latest_known_python_version()\n    PythonInstaller(request=req).install()","preventionTips":["Check python-build-standalone's published releases before requesting exotic versions.","Keep pbs-installer updated so its index reflects newly published builds.","Avoid unsupported combos (free_threaded / pypy) unless you have confirmed a build exists.","Fall back to a system/pyenv interpreter for versions python-build-standalone doesn't ship."],"tags":["python-install","python-build-standalone","version","download"],"analyzedSha":"92b74dcfe348d0e01e14d40d6c1fa47a4ee04a54","analyzedAt":"2026-08-04T20:33:34.072Z","schemaVersion":2}