Playwright (Python) "Executable doesn't exist" in CI
Installing the playwright pip package does not download the browser binaries. The first time a test launches a browser, Playwright looks for the executable, does not find it, and stops.
What this error means
A Playwright test fails with "Executable doesn't exist at .../chromium-XXXX/chrome-linux/chrome" and a hint to run "playwright install".
python
playwright._impl._errors.Error: Executable doesn't exist at
/home/runner/.cache/ms-playwright/chromium-1124/chrome-linux/chrome
Looks like Playwright was just installed or updated.
Please run the following command to download new browsers:
playwright installCommon causes
Browsers were never installed
The CI ran pip install playwright but skipped the separate playwright install step that downloads the browser binaries.
A transient download of the browser failed
The browser download can fail on a flaky network, leaving the executable absent or incomplete.
How to fix it
Run playwright install before the tests
- After installing the pip package, install the browsers (and OS deps) explicitly.
- Re-run the test suite.
.github/workflows/ci.yml
pip install playwright pytest-playwright
playwright install --with-deps chromiumCache the browser download
Cache the Playwright browser directory so the download is reused across runs.
.github/workflows/ci.yml
- uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ hashFiles('requirements.txt') }}How to prevent it
- Always run
playwright installafter installing the package. - Use
--with-depsso OS-level browser dependencies are present. - Cache the browser directory to make installs fast and resilient.
Related guides
Selenium (Python) "session not created" in CIFix Selenium Python "Message: session not created" in CI - the browser and driver versions are mismatched, or…
pip "git+https" install authentication failed in CIFix a pip "git+https://" install that fails authentication in CI - the clone of a private repo dependency has…
Python "ImportError: libGL.so.1: cannot open shared object file" in CIFix "ImportError: libGL.so.1: cannot open shared object file" in CI - a Python wheel needs a system library (…