title: How can I install zlib on Mac OS X Mojave (10.14)?
body: <p>I recently upgraded from Sierra to Mojave. After that I tried to use <code>pyenv install 3.5.6</code>. This uses homebrew in the background to try to install python, which fails with <code>zipimport.ZipImportError: can't decompress data; zlib not available</code>. The same command worked before the upgrade. </p>
  
  <p>This question has been asked before and the generally accepted solution is to install xcode command line tools using this command: <code>xcode-select --install</code>.</p>
  
  <p>I have both xcode 10 and the command line tools installed but zlib is still unavailable.</p>
  
  <p>I tried installing zlib using homebrew but that didn't work either.</p>
  
  <p>(Incidentally I also looked into installing python from a binary but there's no v3.5.6 binary for Mac OS X)</p>
  
  <p>Any help appreciated.</p>