title: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module:
body: <p>I am following the django tutorial, Many have asked the question but I think my situation is bit unique because after installing python-mysql I still get this error when I try to do python manage.py syncdb,</p>
  
  <p>I am in a virtualenv since I use macports to manage my python installation I created my virtualenv </p>
  
  <pre><code>virtualenv code/vdjango --no-site-packages --python=/opt/local/bin/python
  </code></pre>
  
  <p>prior to this using macports I install django <code>py27-django</code>, but after creating my virtualenv I thought its better that I install django on to virtualenv so I used <code>pip install django==1.5</code></p>
  
  <p>According to django tutorial I edited my settings.py file and then execute the python manage.py syncdb and I end up with following error:</p>
  
  <pre><code>[~/code/vdjango/newsite]$python manage.py syncdb
  Traceback (most recent call last):
    File "manage.py", line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/core/management/__init__.py", line 453, in execute_from_command_line
      utility.execute()
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/core/management/__init__.py", line 272, in fetch_command
      klass = load_command_class(app_name, subcommand)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/core/management/__init__.py", line 77, in load_command_class
      module = import_module('%s.management.commands.%s' % (app_name, name))
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
      __import__(name)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 8, in &lt;module&gt;
      from django.core.management.sql import custom_sql_for_model, emit_post_sync_signal
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/core/management/sql.py", line 9, in &lt;module&gt;
      from django.db import models
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/db/__init__.py", line 40, in &lt;module&gt;
      backend = load_backend(connection.settings_dict['ENGINE'])
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/db/__init__.py", line 34, in __getattr__
      return getattr(connections[DEFAULT_DB_ALIAS], item)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/db/utils.py", line 93, in __getitem__
      backend = load_backend(db['ENGINE'])
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/db/utils.py", line 27, in load_backend
      return import_module('.base', backend_name)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
      __import__(name)
    File "/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 17, in &lt;module&gt;
      raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
  django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/mac-pro/code/vdjango/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
    Referenced from: /Users/mac-pro/code/vdjango/lib/python2.7/site-packages/_mysql.so
    Reason: image not found
  </code></pre>
  
  <p>To confirm that I have install python-mysql package I ran the pip install again,</p>
  
  <pre><code>(vdjango)mac-pro@localhost:[~/code/vdjango/newsite]$pip install python-mysqldb
  Downloading/unpacking python-mysqldb
    Could not find any downloads that satisfy the requirement python-mysqldb
  No distributions at all found for python-mysqldb
  Storing complete log in /Users/mac-pro/.pip/pip.log
  </code></pre>
  
  <p>So whats happening here? Looks like I have everything that I need to go further with the tutorial but some how python/django is complaining about not having mysqldb.</p>