I faced the following problem when try to run a django project in Mac OSX 10.9 Mavericks. It has Mysql-python module installed already.
File "/usr/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 17, in
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/usr/local/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: /usr/local/lib/python2.7/site-packages/_mysql.so
Reason: image not found
The problem is libmysqlclient.18.dylib file can not be loaded. We could fix this problem by the following command in shell:
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
Hope it helpful !