[Pythonmac-SIG] building mysqldb on mac os x server
calvin at xmission.com
Sat Aug 14 07:41:05 CEST 2004
Here are the instructions I keep for myself for installing MySQLdb:
mysql - python:
thanks to Andy Dustman.
The include and library directories should be where your mysql include
and lib directories are located. Also, make the version your version.
identify your version by typing on a command line:
$ mysqladmin version
modify the following lines in setup.py
mysqlversion = tuple(map(int, string.split(os.getenv('mysqlversion',
include_dirs = [
library_dirs = [
Rem the following lines if crypt is not installed.
#if mysqlversion > (4,0,0):
elif sys.platform == "darwin": # Mac OS X
here are the basic instructions:
$ tar xfz MySQL-python-0.9.2.tar.gz
$ cd MySQL-python-0.9.2
--modify setup.py as above--
$ python setup.py build
$ python setup.py install
> Thanks for the response.
> I think I've tried that but I'll look again. MySQL came preinstalled
> with the server edition of mac os x but, sadly, MySQLdb didn't. Has any
> one successfully installed MySQLdb with a MySQL installation that wasn't
> installed by fink?
> Chris Miles wrote:
> > Hi,
> > /sw/ is managed by fink, so it looks like mysqldb simply assumes that
> > on Darwin(OS X) MySQL has only been installed by fink.
> > If you have installed it into a different location (or don't use
> > fink), you can try modifying setup.py with the location of your
> > MySQL's include and lib paths.
> > I don't use MySQL on OS X, but this is what the problem appears to be
> > from the info you've sent. Hope that helps.
> > Cheers,
> > Chris
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
More information about the Pythonmac-SIG