1

I want to connect my Django application to an Amazon RDS for PostgreSQL database.

  1. Do I need psycopg2 installed? (I think yes)
  2. How do I install pyscopg2 in a way that doesn't require an entire postgres db install.

The error when installing psycopg2 now is this:

Error: pg_config executable not found.

Please add the directory containing pg_config to the PATH
or specify the full executable path with the option:

    python setup.py build_ext --pg-config /path/to/pg_config build ...

or with the pg_config option in 'setup.cfg'.

I'm on CentOS7.

I tried:

$ yum install postgresql-libs
$ yum install python-psycopg2

These packages installed, but I still get the same error on trying to pip install pyscopg2 after.

Antti Haapala
  • 117,318
  • 21
  • 243
  • 279
Michael van de Waeter
  • 1,219
  • 12
  • 23

0 Answers0