You can check with the following: python manage.py shell
then do the, import MySQLdb If this fails then you are probably running on different python environments. On Wed, Aug 10, 2011 at 2:02 PM, babak <babak.vah...@avail.net> wrote: > Hi I've installed MySQLdb om my mac and can import it: > > Python 2.6.7 (r267:88850, Jul 20 2011, 12:30:08) > [GCC 4.2.1 (Apple Inc. build 5664)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import MySQLdb > > But when I try to create database I get the following error.... > > $./manage.py syncdb > > Traceback (most recent call last): > File "./manage.py", line 14, in <module> > execute_manager(settings) > File "/Users/project/django/core/management/__init__.py", line 438, > in execute_manager > utility.execute() > File "/Users/project/django/core/management/__init__.py", line 379, > in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File "/Users/project/django/core/management/__init__.py", line 261, > in fetch_command > klass = load_command_class(app_name, subcommand) > File "/Users/project/django/core/management/__init__.py", line 67, > in load_command_class > module = import_module('%s.management.commands.%s' % (app_name, > name)) > File "/Users/project/django/utils/importlib.py", line 35, in > import_module > __import__(name) > File "/Users/project/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 "/Users/project/django/core/management/sql.py", line 5, in > <module> > from django.contrib.contenttypes import generic > File "/Users/project/django/contrib/contenttypes/generic.py", line > 6, in <module> > from django.db import connection > File "/Users/project/django/db/__init__.py", line 77, in <module> > connection = connections[DEFAULT_DB_ALIAS] > File "/Users/project/django/db/utils.py", line 91, in __getitem__ > backend = load_backend(db['ENGINE']) > File "/Users/project/django/db/utils.py", line 32, in load_backend > return import_module('.base', backend_name) > File "/Users/project/django/utils/importlib.py", line 35, in > import_module > __import__(name) > File "/Users/project/django/db/backends/mysql/base.py", line 14, in > <module> > raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) > django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb > module: No module named MySQLdb > > > Any idea? could it have something to do with that I also have python > 2.5 installed on my computer? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.