Note that there are some explanatory texts on larger screens.

plurals
  1. POInstalling oursql on Mac OS Lion successes but import in python fails. **Why?**
    text
    copied!<p>I followed the installation instructions for installing oursql on Mac OS X. Since</p> <pre><code>sudo pip install oursql </code></pre> <p>told me, that it couldn't find <code>mysql_config</code> I (located it with <code>locate mysql_config</code> and) told it where to find it by</p> <pre><code>sudo MYSQL_CONFIG=/usr/local/mysql-5.5.14-osx10.6-x86_64/bin/mysql_config pip install oursql </code></pre> <p>I added the terminal output at the bottom for readability reasons. After that I fired up python in terminal (On Mac OS Lion it is python 2.7 now,...) and did</p> <pre><code>&gt;&gt;&gt; import oursql </code></pre> <p>but python keeps telling me:</p> <pre><code>&gt;&gt;&gt; import oursql Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; ImportError: dlopen(/Library/Python/2.7/site-packages/oursql.so, 2): Library not loaded: libmysqlclient.18.dylib Referenced from: /Library/Python/2.7/site-packages/oursql.so Reason: image not found </code></pre> <p>What do I miss? Any suggestions?</p> <hr> <h2>Terminal Output, of pip installation:</h2> <pre><code>Downloading/unpacking oursql Downloading oursql-0.9.2.tar.bz2 (113Kb): 113Kb downloaded Running setup.py egg_info for package oursql Installing collected packages: oursql Running setup.py install for oursql skipping 'oursqlx/oursql.c' Cython extension (up-to-date) building 'oursql' extension /usr/local/mysql-5.5.14-osx10.6-x86_64/bin/mysql_config --cflags llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c oursqlx/oursql.c -o build/temp.macosx-10.7-intel-2.7/oursqlx/oursql.o -I/usr/local/mysql-5.5.14-osx10.6-x86_64/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64 oursqlx/oursql.c: In function ‘__pyx_pf_6oursql_10Connection___cinit__’: oursqlx/oursql.c:4630: warning: implicit conversion shortens 64-bit value into a 32-bit value oursqlx/oursql.c: In function ‘__pyx_pf_6oursql_10_Statement_execute’: oursqlx/oursql.c:10219: warning: implicit conversion shortens 64-bit value into a 32-bit value oursqlx/oursql.c: In function ‘__pyx_pf_6oursql_16_DBAPITypeObject___richcmp__’: oursqlx/oursql.c:17597: warning: implicit conversion shortens 64-bit value into a 32-bit value llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c oursqlx/compat.c -o build/temp.macosx-10.7-intel-2.7/oursqlx/compat.o -I/usr/local/mysql-5.5.14-osx10.6-x86_64/include -Os -g -fno-common -fno-strict-aliasing -arch x86_64 /usr/local/mysql-5.5.14-osx10.6-x86_64/bin/mysql_config --libs llvm-gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -Wl,-F. -arch i386 -arch x86_64 build/temp.macosx-10.7-intel-2.7/oursqlx/oursql.o build/temp.macosx-10.7-intel-2.7/oursqlx/compat.o -o build/lib.macosx-10.7-intel-2.7/oursql.so -L/usr/local/mysql-5.5.14-osx10.6-x86_64/lib -lmysqlclient -lpthread ld: warning: ignoring file build/temp.macosx-10.7-intel-2.7/oursqlx/oursql.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: ignoring file build/temp.macosx-10.7-intel-2.7/oursqlx/compat.o, file was built for unsupported file format which is not the architecture being linked (i386) ld: warning: ignoring file /usr/local/mysql-5.5.14-osx10.6-x86_64/lib/libmysqlclient.dylib, file was built for unsupported file format which is not the architecture being linked (i386) Successfully installed oursql Cleaning up... </code></pre>
 

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