Skip to content

Commit 805acf7

Browse files
committed
[Doc] Solve error when installing psycopg2
1 parent 6e37dd4 commit 805acf7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/preliminaries.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,19 @@ This way, our hooks are properly installed and contained in version control.
8888
pygraphviz
8989
```
9090
1. Run `pipenv sync` as usual.
91+
92+
- On macOS, setting up the Pipenv virtual environment may fail while trying to install `psycopg2` with the following error.
93+
```plain
94+
Error: pg_config executable not found
95+
```
96+
In this case, the `postgresql` binaries are not in the `PATH`.
97+
98+
1. Install a recent version of PostgreSQL, e.g. `postgresql@16`.
99+
```plain
100+
$ brew install postgresql@16
101+
```
102+
1. Add the binaries of your install PostgreSQL version, e.g. `postgresql@16`, to your `PATH`.
103+
```plain
104+
$ export PATH="$PATH:$(brew --prefix postgresql@16)/bin"
105+
```
106+
1. Run `pipenv sync` as usual.

0 commit comments

Comments
 (0)