playwright._impl._api_types.Error: Executable doesn't exist
Fixes Playwright failing at browser launch because the browser binaries were never downloaded. Use when launching Chromium/Firefox/WebKit raises `Executable doesn't exist`. Not for import errors or `No module named 'playwright'`.
pip install playwright installs only the Python package. The actual browser binaries are a separate download, and until you fetch them every launch fails with Executable doesn't exist. Run playwright install (or python -m playwright install chromium for just Chromium) once, and launches work from then on.
The error
playwright._impl._api_types.Error: Executable doesn't exist at [path]/ms-playwright/chromium-XXXX/chrome-linux/chrome
(use `playwright install` to download browsers.)Fix it
- Download the browsers
playwright installExpected: downloads Chromium, Firefox, and WebKit into the ms-playwright cache. For only Chromium: playwright install chromium. If the playwright CLI is not on PATH, use python -m playwright install.
- Confirm the launch works
python -c "from playwright.sync_api import sync_playwright
with sync_playwright() as p:
b = p.chromium.launch()
print(b.version)
b.close()"Expected: prints a Chromium version like 131.0.6778.33 with no error.
- If installs are blocked, point at a system browser instead
p.chromium.launch(executable_path='/usr/bin/google-chrome')Expected: launches using the browser you already have. Useful in locked-down CI where the download is blocked.
When this applies
- the error text contains
Executable doesn't existand suggestsplaywright install - a fresh machine, container, or CI runner where only
pip install playwrightran - it worked on your laptop but fails in Docker
When it does NOT apply
- import errors mean the Python package itself is missing
cannot find Chrome binarystyle errors are selenium's wording, different tool- the browser starts but pages fail to load (network/proxy problem, not this)
Compatibility
All playwright 1.x Python. The exact exception path moved between releases (_api_types vs _errors), but the message and fix are identical.
Variant phrasings
BrowserType.launch: Executable doesn't exist
The same failure worded from the launch call site. Same fix.
Executable doesn't exist at .../firefox-...
You asked for Firefox without installing it. playwright install firefox, or install everything with bare playwright install.
Why it happens
Playwright deliberately splits the driver (PyPI package) from the browsers (downloaded binaries) so one pip install does not drag hundreds of megabytes. The split means pip install playwright alone is never sufficient to launch anything; the playwright install step is mandatory and is the single most skipped step in every Playwright setup guide.
Edge cases
- In Docker, run
playwright install --with-deps chromiumso the OS libraries the browser needs come along too. PLAYWRIGHT_BROWSERS_PATHchanges where browsers are cached. If it points somewhere empty in CI, you get this error despite a local install working.- Version skew: if you upgrade the pip package but not the browsers, delete the old ms-playwright folder and reinstall to avoid mismatched builds.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.