amazon-web-services django mysql mysql-python ubuntu

ubuntu mysqldb not installed properly

I’m running the following commands and get the following error:

root# sudo python syncdb
Traceback (most recent call last):
File "", line 14, in <module>
File "/usr/lib/pymodules/python2.6/django/core/management/", line 438, in execute_manager
File "/usr/lib/pymodules/python2.6/django/core/management/", line 379, in execute
File "/usr/lib/pymodules/python2.6/django/core/management/", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/lib/pymodules/python2.6/django/core/management/", line 67, in load_command_class
module = import_module('' % (app_name, name))
File "/usr/lib/pymodules/python2.6/django/utils/", line 35, in import_module
File "/usr/lib/pymodules/python2.6/django/core/management/commands/", line 7, in <module>
from import custom_sql_for_model, emit_post_sync_signal
File "/usr/lib/pymodules/python2.6/django/core/management/", line 5, in <module>
from django.contrib.contenttypes import generic
File "/usr/lib/pymodules/python2.6/django/contrib/contenttypes/", line 6, in <module>
from django.db import connection
File "/usr/lib/pymodules/python2.6/django/db/", line 77, in <module>
connection = connections[DEFAULT_DB_ALIAS]
File "/usr/lib/pymodules/python2.6/django/db/", line 91, in __getitem__
backend = load_backend(db['ENGINE'])
File "/usr/lib/pymodules/python2.6/django/db/", line 32, in load_backend
return import_module('.base', backend_name)
File "/usr/lib/pymodules/python2.6/django/utils/", line 35, in import_module
File "/usr/lib/pymodules/python2.6/django/db/backends/mysql/", line 14, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: cannot open shared object file: No such file or directory

I have a feeling that mysqldb isn’t configured properly with django, I was wondering if i’m missing anything. i ran the following commands right before it:

# apt-get install python-django
# apt-get install python-mysqldb