ログってなんぼ

エンジニアのメモです

OSX:pyenvでpythonインストール中に「The Python zlib extension was not compiled. Missing the zlib?」

pyenvでpythonをインストール中

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

はい。見ます。

github.com

On Mac OS X 10.9, 10.10 and 10.11 you may need to set the CFLAGS environment variable when installing a new version in order for configure to find the zlib headers (XCode command line tools must be installed first):

xcodeのパスを追加してzlibを見えるようにする必要があるようです

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

無事インストールできました