I\'ve spent several hours trying to install MySQLdb (the Python library) on Mac OS X Snow Leopard. I\'m using these instructions from SO. I keep getting an error, so I\'ve t
sudo pip install mysql-python
worked for me in 10.8.1.
You can also force python to run in 32bit mode:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
try this in .bashrc or .bash_profile
PATH="/usr/local/mysql/bin:${PATH}"
export PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
export VERSIONER_PYTHON_PREFER_64_BIT=no
export VERSIONER_PYTHON_PREFER_32_BIT=yes
Ack. I feel your pain. I spent a really long time also trying to get MySQL working with Python 2.6 on Snow Leopard using a Macbook Air and had lots of architecture problems. What ended up solving it for me, was making sure both my Python and MySQL installations were using a 32 bit architecture like my Snow Leopard was.
I wrote about my solution here, so maybe that'll help:
http://www.markliu.me/2010/jun/09/mysql-and-python-on-32-bit-snow-leopard/
Good luck...