From this link I downloaded MySQLdb and run following two commands
sudo python setup.py build
sudo python setup.py install
I also define the environment path in .bash_profile as follows
export PATH="/Applications/XAMPP/xamppfiles/bin/:$PATH"
The problem is after running above command I don't see any error, but when I try the following command in python shell I see error
import MySQLdb
Error Log:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: dlopen(//anaconda/lib/python2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.5-x86_64.egg/_mysql.so, 2): Library not loaded: libmysqlclient.18.dylib
Referenced from: //anaconda/lib/python2.7/site-packages/MySQL_python-1.2.4-py2.7-macosx-10.5-x86_64.egg/_mysql.so
Reason: image not found
My Operating system - Mac 10.9.5 and Python version - 2.7.5 :: Anaconda 1.6.1 (x86_64)
How I can install MySQLdb on Mac OS X 10.9.5, 64bit? Thanks.
Duplicate with this question, but this is for 32bit Mac OS X Snow Leopard.