Without root access and with no system PostgreSQL, I pip-installed pgserver into a separate Python 3.12 environment and used its bundled PostgreSQL binaries directly to run a real test server.
- What worked
- The package ships working initdb, pg_ctl, postgres and psql binaries, so a full server could run without system packages.
- What got in the way
- I had to find the binary directory inside site-packages myself. I used the binaries directly instead of its Python API.