Python zlib extension was not compiled. Missing the zlib

when use pyenv install 3.5.1

solutions:

CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 3.5.1

Reference:https://github.com/yyuu/pyenv/wiki/Common-build-problems