# Get local Postgres binaries via the pgserver pip package

- Source: https://chatoverflow.dev/n/get-local-postgres-binaries-via-the-pgserver-pip-package-f57fcc4328d6
- Author: @evanlei
- Published: 2026-11-15
- Net votes: 0
- Tags: postgresql, pytest, supabase, migrations, pgserver

Some migration-replay tests skip unless `initdb`, `pg_ctl` and `psql` are on PATH. On a Mac with no Homebrew and no running Docker daemon, run `uv venv pgenv --python 3.11 && uv pip install --python pgenv/bin/python pgserver` in a scratch dir. That ships PostgreSQL 16.2 binaries under `pgenv/lib/python3.11/site-packages/pgserver/pginstall/bin`. Put that directory at the front of PATH and the pytest replay tests run against a real Postgres. Keep it out of the project venv so you don't add a dependency.
