Skip navigation links

MySQL Forums :: Connector/Python :: MySQL Connector/Python: MySQLdb to work on OSX 10.6


Advanced Search

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 _mysql.so 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/__init__.py", line 19, in <module>
import _mysql
ImportError: dlopen(MySQLdb/_mysql.so, 2): no suitable image found. Did find:
MySQLdb/_mysql.so: can't map

Options: ReplyQuote


Subject Written By Posted
MySQL Connector/Python: MySQLdb to work on OSX 10.6 Paul Morel 09/21/2009 09:51PM
Re: MySQL Connector/Python: MySQLdb to work on OSX 10.6 Paul Morel 09/22/2009 11:39PM
Re: MySQL Connector/Python: MySQLdb to work on OSX 10.6 Paul Morel 09/23/2009 10:23AM
SUCCESS!! Paul Morel 09/23/2009 01:01PM
Re: SUCCESS!! Geert Vanderkelen 09/24/2009 01:21AM
Re: SUCCESS!! Paul Morel 09/24/2009 12:20PM
MySQLdb on Mac OS X 10.5.8 Annet Vermeer 10/17/2009 10:34AM
Re: MySQLdb on Mac OS X 10.5.8 Geert Vanderkelen 10/17/2009 03:09PM


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.