I'd recommend targeting a specific version, as we do for Mako. In this case:

```
.build-artefacts/python-venv/bin/pip install "psycopg2==2.5.1"
```