I've got the following installed through MacPorts on MacOS X 10.5.6:
py25-sqlite3 @2.5.4_0 (active)
python25 @2.5.4_1+darwin_9+macosx (active)
sqlite3 @3.6.12_0 (active)
python25
is correctly set as my system's default Python.
I downloaded a fresh copy of Django 1.1 beta (I have the same problem with 1.0 and trunk, though) and installed it with "sudo python setup.py install
".
Things seem to load correctly through the interactive interpreter:
$ python
Python 2.5.4 (r254:67916, Apr 10 2009, 16:02:52)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
>>> import sqlite3
>>> ^D
But:
$ django-admin.py startproject foo
$ cd foo/
$ python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at 0x6c1e70>
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
self.validate(display_num_errors=True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/base.py", line 246, in validate
num_errors = get_validation_errors(s, app)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
from django.db import models, connection
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/__init__.py", line 22, in <module>
backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
ImportError: No module named dummy.base
If I change DATABASE_ENGINE
in settings.py
to "sqlite3
", I get the following, seemingly related problem:
$ python manage.py runserver
Validating models...
Unhandled exception in thread started by <function inner_run at 0x6c1e70>
Traceback (most recent call last):
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/commands/runserver.py", line 48, in inner_run
self.validate(display_num_errors=True)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/base.py", line 246, in validate
num_errors = get_validation_errors(s, app)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/core/management/validation.py", line 22, in get_validation_errors
from django.db import models, connection
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/db/__init__.py", line 22, in <module>
backend = __import__('%s.base' % settings.DATABASE_ENGINE, {}, {}, [''])
ImportError: No module named base
^C$
I swear this all worked a few days ago and I don't recall changing anything related to Django or Python, installation-wise.
My various Google adventures have turned up nothing useful. So... Any ideas?
Edit: 'syncdb
' raises the same exceptions.