Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6223207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:26:55+00:00 2026-05-24T08:26:55+00:00

I am trying to get Django and PostgreSQL to work. So far I am

  • 0

I am trying to get Django and PostgreSQL to work.

So far I am getting the following error when I run syncdb.

....
django.core.exceptions.ImproperlyConfigured:
Error loading psycopg2 module: No module named psycopg2

The following is my settings.py.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': 'mydb',                      # Or path to database file if using sqlite3.
        'USER': 'username',                  # Not used with sqlite3.
        'PASSWORD': 'pwd123',                # Not used with sqlite3.
        'HOST': 'localhost',                 # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '5432',                      # Set to empty string for default. Not used with sqlite3.
    }
}

I think I have installed psycopg2 correctly, but I am not sure (through MacPorts).

Is there a way whether I can check whether psycopg2 is installed?

This link contains the install log of psycopg2

UPDATE

I got it working with the method below, but how do I check whether psycopg2 was actually installed before? and if so how to remove it completely?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:26:55+00:00Added an answer on May 24, 2026 at 8:26 am

    If you are using MAC, make sure psycopg2 is installed and accesible to your main python interpreter.

    This is how I’d install it on a mac:

    $ sudo easy_install django
    $ sudo easy_install psycopg2
    

    Then test it:

    $ python
    >>> import django
    >>> import psycopg2
    

    You should not get any errors.

    Also, if you are using an Eclipse/PYDEV, make sure you reconfigure your interpreter after installing django and psycopg2 libraries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get Django's manage.py to run with modified settings files. I have
I'm trying to get the django-cms to work on google-app-engine. Did anyone succeed in
I'm trying to get a trivial Django project working with Passenger on Dreamhost, following
I am trying to get Django 1.1 working on Google App Engine. I followed
I'm trying to get Django running on GAE using this tutorial . When I
I'm trying to get my Django fixtures printed in a prettier way. I've outputting
OK I give up - after 5 solid hours trying to get a django
I'm running CentOS 5, and am trying to get a django application working with
i'm fairly new to django and just trying a couple simple experiments to get
I'm trying get values from a GridView using the following code: foreach (GridViewRow row

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.