MySQL Forums
Forum List  »  Connector/Python

Re: MySQL Connector/Python: MySQLdb to work on OSX 10.6
Posted by: Paul Morel
Date: September 23, 2009 10:23AM

Achieved partial success. I can now get a build to work but there is a problem with the resulting file.

This is the gcc statement that I used:

gcc -isysroot /Developer/SDKs/MacOSX10.6.sdk -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -O3 -Dversion_info="(1,2,3,'gamma',1)" -D__version__=1.2.3c1 -I/opt/local/include/mysql5/mysql -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c _mysql.c -o build/temp.macosx-10.3-fat-2.6/_mysql.o -arch i386 -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT

The runtime error I get when trying to import MySQLdb is:

>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/", line 19, in <module>
import _mysql
ImportError: dlopen(MySQLdb/, 2): no suitable image found. Did find:
MySQLdb/ can't map

Options: ReplyQuote

Written By
Re: MySQL Connector/Python: MySQLdb to work on OSX 10.6
September 23, 2009 10:23AM
September 23, 2009 01:01PM
September 24, 2009 01:21AM
September 24, 2009 12:20PM
October 17, 2009 10:34AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.