Playwright for Python 1.65 in Docker: driver/node: error while loading shared libraries: libatomic.so.1

/usr/local/lib/python3.12/site-packages/playwright/driver/node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

Short answer: Playwright for Python 1.65 bundles Node 26, and that binary needs libatomic.so.1, which slim Docker images do not have. Install the libatomic1 package before you run playwright install, or pin playwright below 1.65. The --with-deps flag cannot fix it, because it is the Node driver itself that fails to start.

No time to dig in? I fix the build and send you a pull request within 48 hours: $49, card, no account. Still failing, full refund. The free steps are below.

Checked on 14 November 2026 against the sources below.

Why it happens

The playwright package on PyPI ships its own Node.js binary at playwright/driver/node, and every playwright command runs through it. Up to 1.64 that binary was Node 24, which needs only the C and C++ runtime libraries that every image has. Playwright 1.65.0 (PyPI, 9 November 2026) moved it to Node 26, which also links against libatomic.so.1. Slim base images do not include that library, so the driver exits with code 127 before it prints anything else. Nothing in your Dockerfile changed: an unpinned pip install playwright simply started resolving to 1.65. How we checked, on 14 November 2026: we downloaded the Linux wheels from PyPI and read the list of required libraries from the bundled binary without running it. In 1.63.0 and 1.64.0 the binary is Node 24.21.0 and does not list libatomic. In 1.65.0, 1.65.1 and 1.65.2 it is Node 26.13 and lists libatomic.so.1, on both x86_64 and arm64. We also read the layers of python:3.12-slim-bookworm, python:3.13-slim, python:3.14-slim, debian:bookworm-slim, ubuntu:22.04 and ubuntu:24.04 from Docker Hub: none contains a libatomic file. The fix itself is confirmed by users, not reproduced by us: we did not run a container. Four projects report that installing libatomic1 made the same command pass, and more than 20 repositories merged that one-line fix between 9 and 14 November 2026 (GitHub search). We found no issue for it in microsoft/playwright-python on 14 November.

You may also see

process "/bin/sh -c pip install playwright && playwright install --with-deps chromium" did not complete successfully: exit code: 127
python -m playwright install --with-deps chromium exits with code 127

Fix

  1. Check it's this: the failing line names playwright/driver/node and libatomic.so.1, the exit code is 127, and pip show playwright (or your build log) says 1.65.0 or later. If a different .so file is named and the path is a browser, that is the usual missing browser dependency, and playwright install-deps is the fix for that one.
  2. Debian and Ubuntu based images (python:3.x-slim, debian:*-slim, ubuntu:22.04, ubuntu:24.04): install libatomic1 in a step that runs before any playwright command:
    FROM python:3.12-slim
    
    RUN apt-get update \
     && apt-get install -y --no-install-recommends libatomic1 \
     && rm -rf /var/lib/apt/lists/*
    
    RUN pip install --no-cache-dir playwright \
     && playwright install --with-deps chromium
    Keep --with-deps: it still installs what the browser needs.
  3. Can't change the image today (a hosted builder, a shared base image)? Pin the last version with Node 24 in requirements.txt, pyproject.toml or your constraints file, then rebuild:
    playwright<1.65
    1.64.1 is the newest release below 1.65. The browser builds are tied to the package version, so rebuild the image, don't only reinstall the package.
  4. Red Hat family images (Fedora, UBI, Amazon Linux 2023): the package is called libatomic, so dnf install -y libatomic. We did not test these images, and Playwright only supports Debian and Ubuntu officially.
  5. Multi-stage builds: the library must be in the final stage too. If you install Playwright in a builder stage and copy the virtual environment across, the runtime stage needs libatomic1 as well, or the driver fails when the app starts instead of at build time.
  6. Then pin Playwright to an exact version (playwright==1.65.2 or a lockfile). The break reached most projects because the Dockerfile installed whatever was newest. A pinned version moves only when you choose, and Renovate or Dependabot can raise the pull request for you.
  7. Verify in the built image: python -m playwright --version should print the version and exit with code 0. Then start a browser once, for example python -c "from playwright.sync_api import sync_playwright as p; b = p().start().chromium.launch(); b.close()".
Build still red, or no time to dig in? I fix it for you: send a GitHub invite or a zip, and you get a tested pull request that makes the build pass on the new version. No passwords or production keys needed.

Get it fixed: $49

Pay by card, no account needed. Pull request within 48 hours; build still failing, full refund.

How it works: 1. Pay on Gumroad; the checkout asks for the repository. 2. Invite my GitHub user, Donrulezz, to that repository only (private is fine), or email a zip with the failing log to hello@deadlinefix.com. 3. You get a pull request with a list of every change; you review, merge and deploy. I never ask for cloud passwords or production keys.

Who does the work: me, Ashish, the owner of this site, based in India. My public code and tools are on GitHub: github.com/Donrulezz.

Watch out

Sources

Did this fix it?

What's still not working?

Describe what happens and paste any error message. We read every report and fix the page.

Other errors breaking soon

All "breaking soon" fixes