title: ModuleNotFoundError: No module named '_lzma' when building python using pyenv on macos
body: <p>Trying to use pyenv to build python versions on macOS, but every install I make ends up with</p>
  
  <pre class="lang-sh prettyprint-override"><code>❯ python
  &gt;&gt;&gt; import lzma
  
  ModuleNotFoundError: No module named '_lzma'
  </code></pre>
  
  <p>I have installed all of the following packages:</p>
  
  <pre class="lang-sh prettyprint-override"><code>brew install openssl readline sqlite3 xz zlib
  xcode-select --install
  </code></pre>
  
  <p>Only caveat is that homebrew installs packages to <code>~/.brew</code>.</p>
  
  <p>Any input is appreciated.</p>