title: How to set up a PostgreSQL database in Django
body: <p>I'm new to Python and Django.</p>
  
  <p>I'm configuring a Django project using a PostgreSQL database engine backend, But I'm getting errors on each database operation. For example when I run <code>manage.py syncdb</code>, I'm getting:</p>
  
  <pre><code>C:\xampp\htdocs\djangodir&gt;python manage.py syncdb
  Traceback (most recent call last):
    File "manage.py", line 11, in &lt;module&gt;
      execute_manager(settings)
    File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
  438, in execute_manager
      utility.execute()
    File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
  379, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
  261, in fetch_command
      klass = load_command_class(app_name, subcommand)
    File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
  67, in load_command_class
      module = import_module('%s.management.commands.%s' % (app_name, name))
    File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in im
  port_module
      __import__(name)
    File "C:\Python27\lib\site-packages\django\core\management\commands\syncdb.py"
  , line 7, in &lt;module&gt;
      from django.core.management.sql import custom_sql_for_model, emit_post_sync_
  signal
    File "C:\Python27\lib\site-packages\django\core\management\sql.py", line 6, in
   &lt;module&gt;
      from django.db import models
    File "C:\Python27\lib\site-packages\django\db\__init__.py", line 77, in &lt;modul
  e&gt;
      connection = connections[DEFAULT_DB_ALIAS]
    File "C:\Python27\lib\site-packages\django\db\utils.py", line 92, in __getitem
  __
      backend = load_backend(db['ENGINE'])
    File "C:\Python27\lib\site-packages\django\db\utils.py", line 33, in load_back
  end
      return import_module('.base', backend_name)
    File "C:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in im
  port_module
      __import__(name)
    File "C:\Python27\lib\site-packages\django\db\backends\postgresql\base.py", li
  ne 23, in &lt;module&gt;
      raise ImproperlyConfigured("Error loading psycopg module: %s" % e)
  django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No mo
  dule named psycopg
  </code></pre>
  
  <p>Can someone give me a clue on what is going on?</p>