title: pip install MySQL-python, Command "python setup.py egg_info" failed with error code 1
body: <h1>MacOS | Python 2.7</h1>
  <p>I want to use MySQLdb. When I run</p>
  <pre><code>pip install MySQL-python
  </code></pre>
  <p>The result is</p>
  <pre><code>JourneydeMacBook-Pro:~ JourneyWoo$ pip install MySQL-python
  Collecting MySQL-python
    Using cached MySQL-python-1.2.5.zip
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
        File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
        File &quot;/private/var/folders/g9/y4rms8zx6yvjjn1m1w6w0000gn/T/pip-build-JFpAwP/MySQL-python/setup.py&quot;, line 17, in &lt;module&gt;
      metadata, options = get_config()
        File &quot;setup_posix.py&quot;, line 53, in get_config
          libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag(&quot;l&quot;)) ]
        File &quot;setup_posix.py&quot;, line 8, in dequote
          if s[0] in &quot;\&quot;'&quot; and s[0] == s[-1]:
      IndexError: string index out of range
  
      ----------------------------------------
  Command &quot;python setup.py egg_info&quot; failed with error code 1 in /private/var/folders/g9/y4rms8zx6yvjjn1m1w6w0000gn/T/pip-build-JFpAwP/MySQL-python/
  </code></pre>
  <p>I think my pip got a problem, so I run</p>
  <pre><code>pip install --upgrade setuptools
  pip install ez_setup
  pip install unroll
  </code></pre>
  <p>They all work well, but when I try again</p>
  <pre><code>pip install MySQL-python
  </code></pre>
  <p>It still has the problem.</p>
  <p>I did not get the answer which could solve my question and problem from Google Search, really thank you if you could help me with this.</p>