Django Error Loading Mysqldb Module Mac
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions
Error Loading Mysqldb Module: No Module Named Mysqldb Django
you might have Meta Discuss the workings and policies of this importerror: no module named 'configparser' site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Raise Improperlyconfigured("error Loading Mysqldb Module: %s" % E)
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a django.core.exceptions.improperlyconfigured: error loading mysqldb module: dlopen community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error loading MySQLdb module with Django on OS X up vote 1 down vote favorite I have a very strange situation that I can't figure out what's wrong. I'm working on a Django pip install mysql-python error project and I: Installed MySQL on OS X Added the DATABASES values: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'read_default_file': '/path/to/my.cnf', }, } } But then Django/Mezzanine tells me that there's an error loading MySQLdb module. So I Googled for some tips around this and tried these methods: pip install mysql-python Reinstalled pip Downloaded ez_setup.py and installed Now I'm stuck. The same error shows up and it feels like there's a problem with the MySQL connector/adapter to not be able to load this. What should I try next? Edited with traceback: /Library/Python/2.7/site-packages/django/db/utils.py:238: RemovedInDjango19Warning: In Django 1.9 the TEST_COLLATION connection setting will be moved to a COLLATION entry in the TEST setting self.prepare_test_settings(alias) Unhandled exception in thread started by
here for a quick
Environmenterror: Mysql_config Not Found
overview of the site Help Center Detailed answers to _mysql.c:44:23: fatal error: my_config.h: no such file or directory any questions you might have Meta Discuss the workings and policies of
Fatal Error C1083: Cannot Open Include File: 'config-win.h': No Such File Or Directory
this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with http://stackoverflow.com/questions/33717861/error-loading-mysqldb-module-with-django-on-os-x us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up django.core.exceptions.ImproperlyConfigured: http://stackoverflow.com/questions/15312732/django-core-exceptions-improperlyconfigured-error-loading-mysqldb-module-no-mo Error loading MySQLdb module: No module named MySQLdb up vote 48 down vote favorite 10 The problem Im facing while trying to connect to database for mysql. I have also given the database settings that i have used. Traceback (most recent call last): File "manage.py", line 10, in
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta http://stackoverflow.com/questions/6414407/mysqldb-error-when-running-python-server-on-macosx10-6 Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn error loading more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, error loading mysqldb helping each other. Join them; it only takes a minute: Sign up Error loading Mysqldb module in Python Django up vote 0 down vote favorite I am currently working on Ubuntu 14.10/Python/Django/MySQL and encountering the following error when I try to run: $python manage.py makemigrations polls or $python manage.py migrate polls I have also tried syncdb The error is: (Aaronpythonenv)aaron@aaron-N550JK:~/mysite$ python manage.py makemigrations polls Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/home/aaron/Aaronpythonenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/management/init.py", line 338, in execute_from_command_line utility.execute() File "/home/aaron/Aaronpythonenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/core/management/init.py", line 312, in execute django.setup() File "/home/aaron/Aaronpythonenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/init.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/home/aaron/Aaronpythonenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File "/home/aaron/Aaronpythonenv/local/lib/python2.7/site-packages/Django-1.8-py2.7.egg/django/apps/config.py", line 198, in import_models self.models_module = import_module(models_module_name)
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up MySQLdb error when running python server on MacOSX10.6 up vote 5 down vote favorite 4 Running my server (python manage.py runserver) yielded this error: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb I attempted the winning solution on this page with no avail: Django + MySQL on Mac OS 10.6.2 Snow Leopard And then moved on to try Thierry Lam (5 votes) on Problem using MySQLdb: Symbol not found: _mysql_affected_rows After Thierry Lam's suggestions, my error now reads: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/steven/.python-eggs/MySQL_python-1.2.3-py2.6-macosx-10.3-fat.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib Which seems very much like the same linking issue. Any wisdom to share? Thanks in advance. python mysql django osx share|improve this question edited Jun 20 '11 at 17:38 asked Jun 20 '11 at 16:24 Steve Trevathan 2814 add a comment| 2 Answers 2 active oldest votes up vote 15 down vote accepted It looks like you have everything installed right, but it can't find libmysqlclient. Have you tried the following? > sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib > sudo ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql share|improve this answer answered Jun 20 '11 at 18:23 Jeff Holland 27624 Your first line solved my problem - what exactly does this do? Thanks so much for the help. –Steve Trevathan Jun 20 '11 at 19:08 2 You are creating a symbolic link. Your python-mysql module expects it to be in a different place than where it was installed. Now when it looks for the library the symbolic link points it to the correct locat