# pip install postal fails: libpostal.h not found

Source: https://parseaddr.com/libpostal-install-errors
Updated: 2026-11-27

**Short answer:** `postal` (Python) and `node-postal` (Node) are thin bindings. They do not ship libpostal. Build the libpostal C library and download its model data (about 1.8 GB) before the binding will compile. Or skip the build and call libpostal over HTTP.

## The error in Python (postal 1.1.11)

```
postal/pyexpand.c:2:10: fatal error: libpostal/libpostal.h: No such file or directory
  ERROR: Failed building wheel for postal
Failed to build postal
```

## The error in Node (node-postal 1.3.0)

`npm install node-postal` prints no error and exits 0, because the install script is `node-gyp rebuild || (exit 0)`. It fails later at `require`:

```
Error: Could not locate the bindings file. Tried:
 → node_modules/node-postal/build/expand.node
```

`npm install node-postal --foreground-scripts` shows the real cause: `fatal error: libpostal/libpostal.h: No such file or directory`.

## Fix: build libpostal first (Debian/Ubuntu)

```
sudo apt-get install -y build-essential autoconf automake libtool pkg-config git curl
git clone https://github.com/openvenues/libpostal
cd libpostal
./bootstrap.sh
./configure --datadir=/opt/libpostal_data
make -j"$(nproc)"
sudo make install
sudo ldconfig
pip install postal        # or: npm install node-postal
```

Catches: `configure` downloads the model data (about 1.8 GB for the default model, per the libpostal README) unless you pass `--disable-data-download`; the parser keeps its model in RAM (plan 2-4 GB per process); on Linux run `sudo ldconfig` after `make install`.

## Or skip the build

```
curl -s https://api.parseaddr.com/v1/parse \
  -H "Authorization: Bearer $PARSEADDR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"address":"flat 3b, 221 baker st, london nw1 6xe uk"}'
```

Returns `{"parsed": {"unit": "flat 3b", "house_number": "221", "road": "baker st", "city": "london", "postcode": "nw1 6xe", "country": "uk"}}`.

Free plan: 2,000 calls a month, no card. Paid from £19 a month for 25,000 calls. Free key: https://parseaddr.com/#get-key

## When to keep self-hosting

Addresses must never leave your network; more than 1.5 million parses a month; no network hop allowed; or you want to retrain the model.
