Error Importing MySQLdb
benjamin.kaplan at case.edu
Sun Jan 8 17:17:15 EST 2012
On Sun, Jan 8, 2012 at 4:37 PM, David George <dgeorge at daviddgeorge.com> wrote:
> Hello there,
> I have been trying for awhile now to get MySQLdb working. I am currently
> getting this error when trying to import it:
>>>> import MySQLdb
> Traceback (most recent call last): File "", line 1, in File
> "build/bdist.macosx-10.7-intel/egg/MySQLdb/init.py", line 19, in File
> "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 7, in File
> "build/bdist.macosx-10.7-intel/egg/_mysql.py", line 6, in bootstrap
> 2): Library not loaded: /usr/local/lib/libmysqlclient.18.dylib Referenced
> Reason: image not found
> Anyone know what I need to do in order to correct these errors.
MySQLdb is having trouble loading the MySQL client library. Since I
assume MySQL is installed, my best guess is that you have an
architecture problem. Your Python is probably running in 64-bit mode.
Do you have a 64-bit MySQL install? The "file" command will tell you
which architectures are in a binary if you're unsure.
More information about the Python-list