How can I install zlib on Mac OS X Mojave (10.14)?
I recently upgraded from Sierra to Mojave. After that I tried to use pyenv install 3.5.6 . This uses homebrew in the background to try to install python, which fails with zipimport.ZipImportError: can't decompress data; zlib not available . The same command worked before the upgrade. This question has been asked before and the generally accepted solution is to install xcode command line tools using this command: xcode-select --install . I have both xcode 10 and the command line tools installed but zlib is still unavailable. I tried installing zlib using homebrew but that didn't work either.