title: PyEnv BUILD FAILED installing Python on MacOS
body: <p>While trying to install <code>Python 3.6.6</code> (for <code>Airflow</code>) using <code>PyEnv</code> on <code>MacOS</code>, I am encountering <strong>build failure</strong> with following <em>stack-trace</em></p>
  
  <pre><code>File
  "/private/var/folders/6y/kf699bqj2sgcgjshb20fr5zh0000gn/T/python-build.20180721180716.86347/Python-3.6.6/Lib/xmlrpc/client.py",
  line 138, in &lt;module&gt;
      from xml.parsers import expat   File "/private/var/folders/6y/kf699bqj2sgcgjshb20fr5zh0000gn/T/python-build.20180721180716.86347/Python-3.6.6/Lib/xml/parsers/expat.py",
  line 4, in &lt;module&gt;
      from pyexpat import * ModuleNotFoundError: No module named 'pyexpat' make: *** [install] Error 1
  
  BUILD FAILED (OS X 10.13.6 using python-build 20180424)
  
  Inspect or clean up the working tree at
  /var/folders/6y/kf699bqj2sgcgjshb20fr5zh0000gn/T/python-build.20180721180716.86347
  Results logged to /var/folders/6y/kf699bqj2sgcgjsh
  </code></pre>
  
  <p>I've followed the steps mentioned in the docs for <a href="https://github.com/pyenv/pyenv#homebrew-on-mac-os-x" rel="noreferrer">setting-up <code>PyEnv</code> on <code>Mac</code> via <code>Homebrew</code></a>.</p>
  
  <hr>
  
  <p>Environment / Framework versions</p>
  
  <ul>
  <li><code>MacOS High Sierra 10.13.6</code></li>
  <li><code>Homebrew 1.7.1</code></li>
  <li><code>PyEnv 1.2.6</code></li>
  <li>Existing <code>Python</code> distributions
  
  <ul>
  <li><code>Python 2.7.15 [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin</code></li>
  <li><code>Python 3.7.0 [Clang 9.0.0 (clang-900.0.39.2)] on darwin</code></li>
  </ul></li>
  </ul>