ERROR: The Python zlib extension was not compiled. Missing the zlib?

Use this command:

CFLAGS="-I$(brew --prefix readline)/include -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix readline)/lib -L$(brew --prefix openssl)/lib" PYTHON_CONFIGURE_OPTS=--enable-unicode=ucs2 pyenv install -v 2.7.0

Stack trace:

running build_scripts

running install_lib

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Drag.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Ctl.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/gdbm.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Scrap.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_testcapi.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/unicodedata.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_random.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/parser.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/cPickle.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/zlib.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_collections.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_AE.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/Nav.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Folder.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Qdoffs.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/icglue.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/audioop.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Mlte.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Win.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/syslog.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Qd.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_TE.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Evt.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_codecs_hk.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/array.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/termios.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/fcntl.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_Res.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/datetime.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_bisect.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/math.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/mmap.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_sqlite3.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/select.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_List.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_codecs_iso2022.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/itertools.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_codecs_kr.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/grp.so to 755

changing mode of /Users/admin/.pyenv/versions/2.7.0/lib/python2.7/lib-dynload/_hotshot.so to 755

~/Detectron

Installed Python-2.7 to /Users/admin/.pyenv/versions/2.7.0