{"id":"74b7676853097f97","repo":"python-poetry/poetry","slug":"one-or-more-installed-version-do-not-work-on-your","errorCode":null,"errorMessage":"One or more installed version do not work on your system. This is not a Poetry issue.","messagePattern":"One or more installed version do not work on your system\\. This is not a Poetry issue\\.","errorType":"console","errorClass":"PoetryRuntimeError","httpStatus":null,"severity":"error","filePath":"src/poetry/utils/env/python/installer.py","lineNumber":85,"sourceCode":"\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)\n\n        if bad_executables:\n            raise PoetryRuntimeError(\n                reason=\"One or more installed version do not work on your system. This is not a Poetry issue.\",\n                messages=[\n                    ConsoleMessage(\"\\n\".join(e.as_posix() for e in bad_executables))\n                    .indent(\"  - \")\n                    .make_section(\"Failing Executables\")\n                    .wrap(\"info\"),\n                    *[\n                        ConsoleMessage(m).wrap(\"warning\")\n                        for m in BAD_PYTHON_INSTALL_INFO\n                    ],\n                ],\n            )\n\n        return False\n\n    def install(self) -> None:\n        try:\n            # this can be broken into download, and install_file if required to make","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/python-poetry/poetry/blob/92b74dcfe348d0e01e14d40d6c1fa47a4ee04a54/src/poetry/utils/env/python/installer.py#L67-L103","documentation":"Raised as PoetryRuntimeError in PythonInstaller.exists when one or more previously-installed Poetry-managed Python executables raise CalledProcessError while being probed. Poetry treats this as a broken local install (not a Poetry bug) and lists the failing executables plus guidance to remove them.","triggerScenarios":"Calling PythonInstaller(...).exists() (during version checks or 'poetry python list') where an installed standalone python under the installation_directory fails to run - typically missing OS-level shared libraries. Collects bad executables at installer.py:68-97 and raises if any found.","commonSituations":"A standalone build was installed but the host lacks runtime deps (glibc too old, missing libffi/libssl/libz); the install got interrupted leaving a half-extracted binary; an OS upgrade broke ABI compatibility of an older standalone build.","solutions":["Follow the message: 'poetry python remove <version>' for each failing executable listed.","Install the platform runtime requirements python-build-standalone needs (see the docs URL in BAD_PYTHON_INSTALL_INFO).","Reinstall the version after removing: 'poetry python install <version>'.","If the OS is too old (e.g. ancient glibc), use a container/newer base image or a system interpreter instead."],"exampleFix":"// before - installed 3.12 broken on this host\nPythonInstaller(request=\"3.12\").exists()  # -> PoetryRuntimeError\n\n// after - remove and reinstall, or fix host libs\n# poetry python remove 3.12 && poetry python install 3.12","handlingStrategy":"validation","validationCode":"import subprocess\nfrom pathlib import Path\n\ndef installed_pythons_run(installation_dir: Path) -> list[Path]:\n    bad = []\n    for exe in installation_dir.glob(\"**/bin/python*\"):\n        try:\n            subprocess.check_output([str(exe), \"--version\"], text=True)\n        except (subprocess.CalledProcessError, OSError):\n            bad.append(exe)\n    return bad\n\n# before installer.exists():\nassert not installed_pythons_run(installer.installation_directory), \"remove broken installs first\"","typeGuard":"from poetry.console.exceptions import PoetryRuntimeError, PoetryConsoleError\n\ndef is_poetry_runtime_error(e: Exception) -> bool:\n    return isinstance(e, PoetryRuntimeError) or (\n        isinstance(e, PoetryConsoleError) and \"do not work on your system\" in str(e)\n    )","tryCatchPattern":"from poetry.console.exceptions import PoetryRuntimeError\n\ntry:\n    installer.exists()\nexcept PoetryRuntimeError as e:\n    # message lists failing executables - remove them, then retry\n    for ver in parse_failing_versions(e):\n        run_cli([\"poetry\", \"python\", \"remove\", ver])\n    installer.exists()","preventionTips":["Install the OS runtime deps python-build-standalone requires (libffi, libssl, zlib, etc.).","Use a base image/OS whose glibc is new enough for the standalone builds.","Remove broken installs promptly: 'poetry python remove <version>'.","After an OS upgrade, re-validate previously-installed standalone pythons before use."],"tags":["python-install","broken-binary","platform-deps","python-build-standalone"],"analyzedSha":"92b74dcfe348d0e01e14d40d6c1fa47a4ee04a54","analyzedAt":"2026-08-04T20:33:34.072Z","schemaVersion":2}