The setup.py script uses mysql_config to find all compiler and linker options, and should work as is on any POSIX-like platform, so long as mysql_config is in your path.
You must specify where your mysql installation resides. For me, I had to un-comment the line in file site.cfg to read:
mysql_config = /usr/local/mysql/bin/mysql_config
whereas by default it searched in:
mysql_config = /usr/local/bin/mysql_config
I replaced mysql_config function with the following to avoid using 'mysql_config' on debian lenny.
Made it.
def mysql_config(what):
a = {}
a ['libs_r'] = '/usr/lib/libmysqlclient_r.so.15'
a ['libs'] = '/usr/lib/libmysqlclient.so.15'
a ['cflags'] = ['-I/usr/include/mysql/']
a ['include'] = ['-I/usr/include/mysql/']
return a [what]
Comments
http://dev.mysql.com/down...tml#macosx
I'm having the same problem, should i put the MySQL-python-1.2.2 folder in the same folder as mySql? and where is this folder in Ubuntu? plzzz help.
You must specify where your mysql installation resides. For me, I had to un-comment the line in file site.cfg to read: mysql_config = /usr/local/mysql/bin/mysql_config whereas by default it searched in: mysql_config = /usr/local/bin/mysql_config
simply run under ubuntu: sudo apt-get install libmysqlclient-dev python2.6-dev and then : sudo easy_install MySQL-python
bless you bartosak
thank u bartosak
you just saved me a lot of time bartosak
I replaced mysql_config function with the following to avoid using 'mysql_config' on debian lenny. Made it. def mysql_config(what): a = {} a ['libs_r'] = '/usr/lib/libmysqlclient_r.so.15' a ['libs'] = '/usr/lib/libmysqlclient.so.15' a ['cflags'] = ['-I/usr/include/mysql/'] a ['include'] = ['-I/usr/include/mysql/'] return a [what]
Thank you so much. It was a pretty easy fix with you instructions bartosak