High Sierraにしてpyenvからpython入れようとしたら失敗した
pyenvは普通にhomebrewで入れた
$ pyenv install 3.6.3
Downloading Python-3.6.3.tar.xz...
-> https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tar.xz
Installing Python-3.6.3...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (OS X 10.13 using python-build 20160602)
Inspect or clean up the working tree at /var/folders/j5/7gjxgk7n6cx681n7_0hx6ylw0000gn/T/python-build.20171006102601.12194
Results logged to /var/folders/j5/7gjxgk7n6cx681n7_0hx6ylw0000gn/T/python-build.20171006102601.12194.log
Last 10 log lines:
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python.exe -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.1 setuptools-28.8.0
エラーメッセージに
https://github.com/pyenv/pyenv/wiki/Common-build-problems
ここを見ろとあったので,言われたようにやったら入った
$ CFLAGS="-I$(brew --prefix openssl)/include" LDFLAGS="-L$(brew --prefix openssl)/lib" pyenv install -v 3.6.3
はい
$ pyenv versions
* system (set by /Users/so/.pyenv/version)
3.6.3