unable to install psycopg2 on python3

Viewed 297

I'm trying to install psycopg2 module on python3 on a CentOS Linux 7 and getting the following error

In file included from psycopg/psycopgmodule.c:28:0:
./psycopg/psycopg.h:36:22: fatal error: libpq-fe.h: No such file or directory
 #include <libpq-fe.h>
                      ^
compilation terminated.

It appears you are missing some prerequisite to build the package from source.

You may install a binary package by installing 'psycopg2-binary' from PyPI.
If you want to install psycopg2 from source, please install the packages
required for the build and try again.

For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).

error: command 'gcc' failed with exit status 1

Any ideas as to what the solution would be?

Thanks

0 Answers
Related