After installing Homebrew ...
--Install with pyenv. (Confirm)
$ brew update
$ brew install pyenv
$ pyenv install --list
Select the latest installable version. (This time,"3.8.1"To)
$ pyenv install 3.8.1
--Check the version of python used by default. (Because it is still 3.7.4
)
$ pyenv versions
system
* 3.7.4 (set by /Users/myname/.pyenv/version)
3.8.1
--Switch with the pyenv global
command to use the installed 3.8.1
.
$ pyenv global 3.8.1
$ pyenv versions
system
3.7.4
* 3.8.1 (set by /Users/myname/.pyenv/version)
--If you check the version, it is 3.8.1.
$ python -V
Python 3.8.1
$ pip install --upgrade pip
$ pip -V
pip 20.0.2 from /Users/myname/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pip (python 3.8)
-(Because if you do not do pip install pipenv
, the pipenv included in the old 3.7.4 will be used.)
$ pip install pipenv
$ pipenv --version
pipenv, version 2018.11.26
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
(^ω^)
Recommended Posts