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 7868737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:05:45+00:00 2026-06-03T01:05:45+00:00

I am having a real trouble in setting up spatial database and syncing it

  • 0

I am having a real trouble in setting up spatial database and syncing it with GeoDjango. I was able to setup the spatial database as per the geodjango documentation and create a django app but when i run

python manage.py sqlall world

I am getting this,

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/commands/sqlall.py", line 4, in <module>
    from django.core.management.sql import sql_all
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/core/management/sql.py", line 6, in <module>
    from django.db import models
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/__init__.py", line 40, in <module>
    backend = load_backend(connection.settings_dict['ENGINE'])
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
    return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/utils.py", line 92, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/home/smaranh/django-env/local/lib/python2.7/site-packages/django/db/utils.py", line 44, in load_backend
    raise ImproperlyConfigured(error_msg)
django.core.exceptions.ImproperlyConfigured: 'django.contrib.gis.db.backends.postgis' isn't an available database backend.
Try using django.db.backends.XXX, where XXX is one of:
    'dummy', 'mysql', 'oracle', 'postgresql_psycopg2', 'sqlite3'
Error was: No module named psycopg2.extensions

I am tired and really not sure what to do? Please help

EDIT

Ok I found this link which kind of tells me what went wrong. Now when i get into the python from \home, and i execute import psycopg2 it does not give me any ImportError but when i am inside the virtual env, I get the ImportError

(django-env)smaranh@ubuntu:~/geodjango$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09) 
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named psycopg2

Now the link guides me in how to append the path but i am not really understanding the process since I am new and i do not wish to screw it up further. So can somebody pls guide me step by step how to append the sys.path??

  • 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-06-03T01:05:47+00:00Added an answer on June 3, 2026 at 1:05 am

    If you are using virtualenv you need install psycopg2 inside the environment, something like:

    pip install psycopg2 
    

    but you need install some packages with apt before that:

    sudo apt-get install python-dev postgresql-server-dev-all
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been having real trouble getting my app to run on Heroku. I'm pretty
I'm having real trouble generating a text file per 'operation' to store operation specific
I'm having real trouble using find in my test railwayjs app. In my model:
i'm having a real trouble with UITabBarController. I have a simple foto app, and
I am having real trouble with provisioning and code signing issues. I have migrated
I'm having a real trouble to get accents right, and I believe this may
I am having real difficulty getting my head around the issue of setting the
I'm having trouble setting up a clean development environment with all the web sites
I'm having real trouble understanding the specification and guidelines on how to properly escape
I am having trouble retrieving float/real values out of PostgreSQL. For example, I would

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.