diff --git a/playwright/_impl/_transport.py b/playwright/_impl/_transport.py index f07d31dcd..f2f455c50 100644 --- a/playwright/_impl/_transport.py +++ b/playwright/_impl/_transport.py @@ -105,9 +105,9 @@ async def connect(self) -> None: self._stopped_future: asyncio.Future = asyncio.Future() try: - # For pyinstaller + # For pyinstaller and Nuitka env = get_driver_env() - if getattr(sys, "frozen", False): + if getattr(sys, "frozen", False) or globals().get("_compiled__"): env.setdefault("PLAYWRIGHT_BROWSERS_PATH", "0") startupinfo = None