title: Installing MySQLdb for python2.7
body: <p>I have various versions of python (python2.4 and python2.7) installed on the CentOS machine. I installed MySQL-python, but I can only import the MySQLdb module on python2.4 <strong>but not python2.7</strong></p>
  
  <pre><code>root# python2.7
  Python 2.7.11 |Continuum Analytics, Inc.| (default, Dec  6 2015, 18:08:32) 
  [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  Anaconda is brought to you by Continuum Analytics.
  Please check out: http://continuum.io/thanks and https://anaconda.org
  &gt;&gt;&gt; import MySQLdb
  Traceback (most recent call last):
     File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: No module named MySQLdb
  
  root# python
  Python 2.4.3 (#1, Mar  5 2011, 21:26:05) 
  [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import MySQLdb
  &gt;&gt;&gt; 
  </code></pre>
  
  <p>I've tried alias'ing python to /usr/bin/python2.7 and then doing a 'yum remove MySQL-python' and then doing a 'yum install MySQL-python' but no luck. Any clues/insights? Thanks.</p>