Note that there are some explanatory texts on larger screens.

plurals
  1. POError configuring django with python-mysql in Mac OS 10.6.6
    primarykey
    data
    text
    <p>My Setup:</p> <ul> <li>Mac OS 10.6.6 - x86_64</li> <li>MySQL 5.5.8</li> <li>Python 2.7.1</li> <li>Django 1.2.5</li> <li>mysql-python installed via easy_install</li> </ul> <p>My situation:</p> <p>I've been struggling to get my setup to work. The problem is with the mysql-python interface. Originally, I was getting a similar problem (to the one I'm having with Django) doing an import statement in python:</p> <pre><code>import MySQLdb </code></pre> <p>But I read this <a href="https://stackoverflow.com/questions/4559699/python-mysqldb-and-library-not-loaded-libmysqlclient-16-dylib">question/solution</a> that proved successful in fixing it. I installed django and it works great but it is having problems with the mysql interface. When I fire the Terminal and type:</p> <pre><code>&gt;&gt; python manage.py dbshell </code></pre> <p>the following error is generated:</p> <blockquote> <p>Traceback (most recent call last): File "manage.py", line 11, in execute_manager(settings) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/<strong>init</strong>.py", line 438, in execute_manager utility.execute() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/<strong>init</strong>.py", line 379, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/<strong>init</strong>.py", line 261, in fetch_command klass = load_command_class(app_name, subcommand) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/<strong>init</strong>.py", line 67, in load_command_class module = import_module('%s.management.commands.%s' % (app_name, name)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module <strong>import</strong>(name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/management/commands/dbshell.py", line 4, in from django.db import connections, DEFAULT_DB_ALIAS File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/<strong>init</strong>.py", line 77, in connection = connections[DEFAULT_DB_ALIAS] File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/utils.py", line 92, in <strong>getitem</strong> backend = load_backend(db['ENGINE']) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/utils.py", line 33, in load_backend return import_module('.base', backend_name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module <strong>import</strong>(name) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 14, in raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: dlopen(/Users/adogc45/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp/_mysql.so, 2): Library not loaded: libmysqlclient.16.dylib Referenced from: /Users/adogc45/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp/_mysql.so Reason: image not found</p> </blockquote> <p>Now, I don't understand why importing the module in Python doesn't raise an error, but using the mysql interface in django does.</p> <p>BTW, my settings.py looks like this:</p> <pre><code>DATABASES = { 'default': { 'ENGINE': 'mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. </code></pre> <p>Also, the image actually exits in .../MySQL_python-1.2.3-py2.7-macosx-10.6-intel.egg-tmp</p> <p>So, I have NO idea about what's going on.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload