Now I have a problem as the title. Here is my environment:
- OS:ubuntu 10.10
- Python:2.6.6
- Django:1.4 pre-alpha
Before, I installed Django 1.1.1 for the The Django Book. Today , I removed Django 1.1.1 by cmd: sudo apt-get install --purge python-django, then get the latest version of 1.4 pre-alpha.
when I followed the tutorial on the docs.djangoproject.com, and execute cmd: python manage.py shell, it comes some error and the infomation like this:
Traceback (most recent call last):
File "manage.py", line 9, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 422, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.6/dist-packages/django/core/management/__init__.py", line 361, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 222, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/base.py", line 355, in handle
return self.handle_noargs(**options)
File "/usr/local/lib/python2.6/dist-packages/django/core/management/commands/shell.py", line 46, in handle_noargs
from django.db.models.loading import get_models
File "/usr/local/lib/python2.6/dist-packages/django/db/__init__.py", line 27, in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "/usr/local/lib/python2.6/dist-packages/django/db/utils.py", line 81, in __getitem__
backend = load_backend(db['ENGINE'])
File "/usr/local/lib/python2.6/dist-packages/django/db/utils.py", line 23, in load_backend
return import_module('.base', backend_name)
File "/usr/local/lib/python2.6/dist-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
ImportError: No module named base
Could some guys tell me how solve this problem?
Thanks!!
The problem is probably because You have no full path for your DB backend. You probably have:
instead of: