エラー
pyenv installしようとして以下のエラーが出た。
$ pyenv install 3.8-dev
Downloading openssl-1.0.2k.tar.gz...
-> https://pyenv.github.io/pythons/6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
Installing openssl-1.0.2k...
Installed openssl-1.0.2k to /Users/xxxx/.pyenv/versions/3.8-dev
python-build: use readline from homebrew
Cloning https://github.com/python/cpython...
Installing Python-3.8-dev...
python-build: use readline from homebrew
ERROR: invalid Python executable: /Users/xxxx/.pyenv/versions/3.8-dev/bin/python3.8
The python-build could not find proper executable of Python after successful build.
Please open an issue for future improvements.
https://github.com/pyenv/pyenv/issues
BUILD FAILED (OS X 10.14.6 using python-build 20180424)
Inspect or clean up the working tree at /var/folders/mt/60ryk_vd0t31nhq0lbs00tfr0000gn/T/python-build.20200521173320.20266
Results logged to /var/folders/mt/60ryk_vd0t31nhq0lbs00tfr0000gn/T/python-build.20200521173320.20266.log
Last 10 log lines:
install|*) ensurepip="" ;; \
esac; \
./python.exe -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Looking in links: /var/folders/mt/60ryk_vd0t31nhq0lbs00tfr0000gn/T/tmph_359u_1
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-19.2.3 setuptools-41.2.0
対処
以下のissueにたどり着き、pyenvをupgradeしたら問題なくpyenv installが成功した。
https://github.com/pyenv/pyenv/issues/743
$ brew upgrade pyenv
$ pyenv install 3.8-dev
python-build: use openssl@1.1 from homebrew
python-build: use readline from homebrew
Cloning https://github.com/python/cpython...
Installing Python-3.8-dev...
python-build: use readline from homebrew
python-build: use zlib from xcode sdk
Installed Python-3.8-dev to /Users/xxxx/.pyenv/versions/3.8-dev