title: Installing MySQLdb on Mac OS X 10.9.5
body: <p>From this <a href="https://pypi.python.org/pypi/MySQL-python/1.2.4" rel="nofollow noreferrer">link</a> I downloaded MySQLdb and run following two commands </p>
  
  <pre><code>sudo python setup.py build
  sudo python setup.py install
  </code></pre>
  
  <p>I also define the environment path in .bash_profile as follows </p>
  
  <pre><code>export PATH="/Applications/XAMPP/xamppfiles/bin/:$PATH"
  </code></pre>
  
  <p>The <strong>problem</strong> is after running above command I don't see any error, but when I try the following command in python shell I see error </p>
  
  <pre><code>import MySQLdb
  </code></pre>
  
  <p><strong>Error Log:</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "MySQLdb/__init__.py", line 19, in &lt;module&gt;
      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
  </code></pre>
  
  <p>My Operating system - Mac 10.9.5 and Python version - 2.7.5 :: Anaconda 1.6.1 (x86_64)</p>
  
  <p><strong>How I can install MySQLdb on Mac OS X 10.9.5, 64bit?</strong> Thanks.</p>
  
  <p>Duplicate with <a href="https://stackoverflow.com/questions/5531958/installing-mysqldb-on-mac-os-x">this question</a>, but this is for 32bit Mac OS X Snow Leopard.</p>