MacにHomebrewで入れたpyenvでpython3.4.3をインストールする
普通に"pyenv install -v 3.4.3"ってやるとエラーが出ました。
エラーメッセージに記載されていたURLを見てみる。
Common build problems · yyuu/pyenv Wiki · GitHub
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
If you have homebrew openssl and pyenv installed, you may need to tell the compiler where the openssl package is located:
CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install -v 3.4.3
まさにこのケースでした。
homebrewでopensslとpyenvをインストールしている場合はopensslの場所を指定してあげないといけないとのこと。