When I tried to install python with pyenv, it failed with the following error.
$ pyenv install 2.7.xx
Installing Python-2.7.xx...
ERROR: The Python zlib extension was not compiled. Missing the zlib?
Please consult to the Wiki page to fix the problem.
https://github.com/yyuu/pyenv/wiki/Common-build-problems
BUILD FAILED
According to the page written in the message, you can enter the following.
$ CFLAGS="-I$(xcrun --show-sdk-path)/usr/include" pyenv install -v 2.7.xx
If this doesn't help, it says to reinstall the XCode command line tools.
$ xcode-select --install
Recommended Posts