Install PostgreSQL with pip install pgvenv
pgvenv is a Python package that embeds a fully isolated PostgreSQL installation
in your virtual environmnent.
pip install pgvenv
PostgreSQL will be built from source,
using --prefix=$VENVPATH.
Its binaries (psql,pg_config,postgres etc.)
will be put under venv/bin along with the pip, python3 binaries.
python3.11 -m venv ./venv
PGVERSION=17.4 CFLAGS="-O2" PGCONFIGUREFLAGS="--without-icu" \
./venv/bin/pip install pgvenv
You can now use your favorite scripts
./venv/bin/pg_config --version # PostgreSQL 17.4
./venv/bin/initdb ./pgdata
./venv/bin/postgres -D ./pgdata
Installation
This requires:
- Autoreconf
- The normal C compiler toolchain, such as gcc and make.
Release files for pgvenv 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pgvenv-0.1.1.tar.gz | 4.0 kB | Details |
Release files / pgvenv-0.1.1.tar.gz
| Download URL | pgvenv-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e56f07c00468f9819947eeeb5f545343ab6ff3faade63c40bb6917e6c8799229
|
|
BLAKE2b-256 checksum How to use checksums |
e5e3aac59c2fa566451fbb7e8832ebbdd7b26cee94571a496fe5dd65741bce14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.12
|