「Mac/インストール/pyenv」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→pythonをglobalに反映) |
(→pythonのバージョンをglobalに反映) |
||
| 行18: | 行18: | ||
$ python -V | $ python -V | ||
Python 3.11.7 | Python 3.11.7 | ||
| + | </pre> | ||
| + | |||
| + | ==pythonのバージョンをlocalに反映== | ||
| + | <pre> | ||
| + | pyenv local 3.11.7 | ||
</pre> | </pre> | ||
2023年12月21日 (木) 19:31時点における版
pyenvインストール
brew install pyenv
pythonバージョン一覧
pyenv install --list pyenv install --list | egrep '^[ ]+[3]\.(9|10|11)\..+$'
参考:https://qiita.com/crankcube/items/15f06b32ec56736fc43a
指定pythonインストール
pyenv install 3.11.7
pythonのバージョンをglobalに反映
$ pyenv global 3.11.7 system * 3.11.7 $ python -V Python 3.11.7
pythonのバージョンをlocalに反映
pyenv local 3.11.7
