Where does django look for sqlite3 installation/libraries?
Question
Am having a bit of a problem making my django application run in SUSE linux 9. I have Python2.5 installed well, Django 1.0 installed well. Am able to execute django command django-admin startproject fine
But when i run the runserver command i get the error below. i have a folder with sqlite3, i can go in there and actually run the sqlite3* application, now am wondering where does Django look for the sqlite libraries? and how can i fix this?
Validating models...
Unhandled exception in thread started by <function inner_run at 0x2a96cb4f50>
Traceback (most recent call last):
File "/usr/local/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
self.validate(display_num_errors=True)
File "/usr/local/lib/python2.5/site-packages/django/core/management/base.py", line 122, in validate
num_errors = get_validation_errors(s, app)
File "/usr/local/lib/python2.5/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
from django.db import models, connection
File "/usr/local/lib/python2.5/site-packages/django/db/__init__.py", line 16, in <module>
backend = __import__('%s%s.base' % (_import_path, settings.DATABASE_ENGINE), {}, {}, [''])
File "/usr/local/lib/python2.5/site-packages/django/db/backends/sqlite3/base.py", line 27, in <module>
raise ImproperlyConfigured, "Error loading %s module: %s" % (module, exc)
django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 module: No module named _sqlite3
Gath
No correct solution
OTHER TIPS
It sounds like you have the sqlite3
application, but not the Python libraries. Since they usually come as part of the Python distribution for versions 2.5 upwards, the likelihood is that you have a minimal Python install.
I don't know anything about how SUSE deals with packages, but try installing the Python-dev package or equivalent.
(Also note that SUSE 9 seems like a very old version - it's currently up to 11. You might want to upgrade your whole system.)
Sounds like you didn't have the sqlite3-devel
package installed when you built Python. Install that package, rebuild Python, then try again.