Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #18690

Re: Error Importing MySQLdb

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <bsk16@case.edu>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'subject:Error': 0.05; 'mode,': 0.07; 'python"': 0.07; 'skip:/ 40': 0.07; 'suggestions.': 0.07; 'python': 0.08; '32-bit': 0.09; 'libraries.': 0.09; 'x86_64': 0.09; 'library': 0.13; 'binary': 0.13; '"file"': 0.16; '-i386': 0.16; 'heuristics': 0.16; 'lion': 0.16; 'mode.': 0.16; 'posted,': 0.16; 'wrote:': 0.18; 'issue.': 0.19; 'jan': 0.19; 'header:In-Reply-To:1': 0.22; '64-bit': 0.23; 'command': 0.24; 'fine': 0.24; 'traceback': 0.24; 'loaded': 0.25; 'architecture': 0.26; 'load': 0.26; 'message-id:@mail.gmail.com': 0.28; 'universal': 0.29; 'pm,': 0.29; 'sun,': 0.30; 'thanks': 0.31; "won't": 0.33; 'to:addr:python-list': 0.34; 'force': 0.34; 'received:209.85.212': 0.34; 'file.': 0.34; 'executable': 0.34; 'running': 0.35; '(for': 0.35; 'install': 0.35; 'file': 0.36; 'uses': 0.36; 'run': 0.37; 'received:google.com': 0.37; 'using': 0.38; 'received:209.85': 0.38; 'client': 0.39; 'should': 0.39; "it's": 0.40; 'received:209': 0.40; 'to:addr:python.org': 0.40; 'within': 0.60; 'type': 0.61; 'according': 0.61; 'your': 0.61; '2012': 0.67; 'about?': 0.84
MIME-Version 1.0
In-Reply-To <18369429.1936.1326062224503.JavaMail.geo-discussion-forums@vbdz6>
References <L0oOq.65165$8O1.34287@newsfe07.iad> <mailman.4532.1326061044.27778.python-list@python.org> <18369429.1936.1326062224503.JavaMail.geo-discussion-forums@vbdz6>
Date Sun, 8 Jan 2012 20:23:09 -0500
Subject Re: Error Importing MySQLdb
From Benjamin Kaplan <benjamin.kaplan@case.edu>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Junkmail-Whitelist YES (by domain whitelist at mpv2.tis.cwru.edu)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.4537.1326072193.27778.python-list@python.org> (permalink)
Lines 27
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1326072193 news.xs4all.nl 6874 [2001:888:2000:d::a6]:41441
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:18690

Show key headers only | View raw


On Sun, Jan 8, 2012 at 5:37 PM, davidfx <dgeorge29ca@gmail.com> wrote:
> I am not sure what file you mean.  Where should I look for the file you are talking about?  By the way MySQL works fine within MAMP.
>
> Thanks for your suggestions.


Like I said, it's likely an architecture issue. If you have a 32-bit
MySQL install and are using a 64-bit Python, it won't be able to load
the client libraries. The Python install included in Lion is universal
(a single file containing both 32-bit and 64-bit executables) so if
it's loaded by a 32-bit program, it will load in 32-bit mode.

"file" is a command that uses heuristics to determine the type of a
file. You run it from a terminal.

$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 2 architectures
/usr/bin/python (for architecture x86_64):	Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture i386):	Mach-O executable i386

Try running "file /usr/local/lib/libmysqlclient.18.dylib". According
to the traceback you posted, that's the library that failed to load.

If you need to force Python to run in 32-bit mode, you can use the arch command
"arch -i386 python"

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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