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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:58:45+00:00 2026-05-25T12:58:45+00:00

I’m having trouble in getting Django work with a postgresl database on my webhosting

  • 0

I’m having trouble in getting Django work with a postgresl database on my webhosting provider.

My situation is as follows: I have an account on my webhosting provider, I do not have root-priviledges or the ability to install anything except locally in my home folder. I’m running Django through fcgi (because that is the only way for me afaik). I’m trying to convert my website to use Django. The webhosting server is running 64bit (debian or something custom I think).

After a LOT of trouble with includes (and especially where to put all the includes) I’ve gotten pretty far and Django stuff is mainly working, except making a connection to my postgresql database. I have “installed” (ie. untarred and put in my $PYTHONPATH) Django and psycopg2 to my ~/python-modules/ folder.

But for some reason I’m getting this when trying to do python manage.py syncdb:

> Traceback (most recent call last):
  File "manage.py", line 14, in <module>
    execute_manager(settings)
  File "/home/users/username/python-modules/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/users/username/python-modules/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/users/username/python-modules/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/users/username/python-modules/django/core/management/__init__.py", line 67, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/users/username/python-modules/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/users/username/python-modules/django/core/management/commands/syncdb.py", line 7, in <module>
    from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
  File "/home/users/username/python-modules/django/core/management/sql.py", line 6, in <module>
    from django.db import models
  File "/home/users/username/python-modules/django/db/__init__.py", line 78, in <module>
    connection = connections[DEFAULT_DB_ALIAS]
  File "/home/users/username/python-modules/django/db/utils.py", line 93, in __getitem__
    backend = load_backend(db['ENGINE'])
  File "/home/users/username/python-modules/django/db/utils.py", line 33, in load_backend
    return import_module('.base', backend_name)
  File "/home/users/username/python-modules/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/users/username/python-modules/django/db/backends/postgresql_psycopg2/base.py", line 24, in <module>
    raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: /home/users/username/python-modules/psycopg2-2.4.2/build/lib.linux-x86_64-2.6/psycopg2/_psycopg.so: undefined symbol: PyByteArray_Type

I currently have no idea why it can’t find a basic python datatype. Psycopg2 linked to wrong python version or something?

  • 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-25T12:58:46+00:00Added an answer on May 25, 2026 at 12:58 pm

    yes, it looks like a versioning problem. more exactly the python running is lower than the one psycopg2 is built for (2.6)

    you can check the python version by running ‘python -V’ or calling ‘sys.version_info’, but if your distribution is a debian stable then the default python is 2.5

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a reasonable size flat file database of text documents mostly saved in
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I have a bunch of posts stored in text files formatted in yaml/textile (from

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.