Just installed Django (with easy_install) and created a project, but can't get mysql to work.
python manage.py syncdb throws this error:
.....
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/db/backends/mysql/base.py", line 13, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb
I have MAMP installed and path to MySQL is probably: /Applications/MAMP/Library/bin/mysql
Thanks!
-
Do you have MySQLdb python library installed?luc– luc2009年11月23日 07:46:26 +00:00Commented Nov 23, 2009 at 7:46
2 Answers 2
you need Python library for MySQL access, MySQLdb:
2 Comments
The MySQL egg requires a compiler from the dev tools (download XCode from the apple developers site) and a MySQL installation.
If you have installed those, you have set the PATH to include mysql_config.
export PATH=$PATH:/usr/local/mysql-5.1.39-osx10.5-x86_64/bin/
Check the path, as this is the installation on my machine!
After that, you should be able to build the egg with easy_install.
Good google terms are MySQLdb OS X Snow Leopard.
Comments
Explore related questions
See similar questions with these tags.