With AtCoder supporting Python 3.8, I decided to update the Python I had on my Mac.
However, even if I googled, only fragmentary information came out and it took a long time. So, I have put together an update procedure for myself. It seems that the same situation will occur again when 3.9 comes out.
MacBook Air OS Catalina version 10.15
When I tried to install Python 3.8.2 from pyenv, I was told something like this ↓.
python-build: definition not found: 3.8.2
See all available versions with `pyenv install --list'.
If the version you need is missing, try upgrading pyenv:
brew update && brew upgrade pyenv
HomeBrew and pyenv are old ...? If you touch this area frequently, there should be no problem, but if you touch it only occasionally and are covered with dust, you will have to update it.
#HomeBrew Appde
brew update
#pyenv appde (1.2.13 -> 1.2.15)
brew upgrade pyenv
It took about 10 minutes to finish the app. (too late?)
Just in case, after confirming that there is 3.8.2 with pyenv install --list
, start Python installation.
# Python3.8.Install 2
pyenv install 3.8.2
The installation was completed after about 10 minutes, but I saw it was old, so I will set Global.
python -V
# Python 3.7.4
pyenv versions
# system
#* 3.7.4 (set by /Users/****/.pyenv/version)
# 3.8.2
pyenv global 3.8.2
python -V
# Python 3.8.2
end
Recommended Posts