title: How to link PostgreSQL database to Django 1.9? Windows
body: <p>I've been looking for a lot of reference about installing the PostgreSQL database on Django. I've seen various answers but can't find the appropiate for me and mi OS.</p>
  
  <p>Just downloaded PostgreSQL, and the <strong>pg_config</strong>. I just can't link it to Django to start working with the Database. When I try to run the server it appears a huge command finishing with:</p>
  
  <pre><code>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'.
  
  ----------------------------------------
  Command "python setup.py egg_info" failed with error code 1 in C:\Users\usuario\AppData\Local\Temp\pip-build-xnske745\psycopg2
  </code></pre>
  
  <p>I don't know where to find that 'setup.py' to execute it, nor how to configure the PATH for the database to detect de pg_config and to start running to database. My settings.py database look like this:</p>
  
  <pre><code>DATABASES = {
  'default': {
  'ENGINE': 'django.db.backends.postgresql_psycopg2',
  'NAME': 'database1',                      
  'USER': 'root',
  'PASSWORD': '123456',
  'HOST': 'localhost',
  'PORT': '8000',
  }
  }
  </code></pre>
  
  <p>So, what's wrong? How could I configure the PATH to make PostgreSQL work properly? I'm running Python 3.5, Django 1.9.1 and PostgreSQL 9.5. Already have in PostgreSQL directory the psycopg2-2.6.2.tar file.</p>
  
  <p>Help would be really appreciate. Thank you!!</p>