Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #18682
| References | <L0oOq.65165$8O1.34287@newsfe07.iad> |
|---|---|
| Date | 2012-01-08 17:17 -0500 |
| Subject | Re: Error Importing MySQLdb |
| From | Benjamin Kaplan <benjamin.kaplan@case.edu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4532.1326061044.27778.python-list@python.org> (permalink) |
On Sun, Jan 8, 2012 at 4:37 PM, David George <dgeorge@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 > ImportError: > dlopen(/Users/username/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, > 2): Library not loaded: /usr/local/lib/libmysqlclient.18.dylib Referenced > from: > /Users/username/.python-eggs/MySQL_python-1.2.3-py2.7-macosx-10.7-intel.egg-tmp/_mysql.so > Reason: image not found > > Anyone know what I need to do in order to correct these errors. > > Thanks 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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Error Importing MySQLdb David George <dgeorge@daviddgeorge.com> - 2012-01-08 16:37 -0500
Re: Error Importing MySQLdb Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-01-08 17:17 -0500
Re: Error Importing MySQLdb davidfx <dgeorge29ca@gmail.com> - 2012-01-08 14:37 -0800
Re: Error Importing MySQLdb davidfx <dgeorge29ca@gmail.com> - 2012-01-08 14:37 -0800
Re: Error Importing MySQLdb Dave Angel <d@davea.name> - 2012-01-08 18:08 -0500
Re: Error Importing MySQLdb Benjamin Kaplan <benjamin.kaplan@case.edu> - 2012-01-08 20:23 -0500
Re: Error Importing MySQLdb John Nagle <nagle@animats.com> - 2012-01-08 21:47 -0800
csiph-web