Skip to content
Latchkey

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 install

Common 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

  1. After installing the pip package, install the browsers (and OS deps) explicitly.
  2. Re-run the test suite.
.github/workflows/ci.yml
pip install playwright pytest-playwright
playwright install --with-deps chromium

Cache 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 install after installing the package.
  • Use --with-deps so OS-level browser dependencies are present.
  • Cache the browser directory to make installs fast and resilient.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →