Amazon Linux 2023へのpyenv インストール方法

1. インストーラをダウンロードする。

$ curl -fsSL https://pyenv.run | bash

2. ~/.bashrc へPathを設定する

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(pyenv init - bash)"' >> ~/.bashrc

3. ~/.bash_profileへPathを設定する

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo '[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init - bash)"' >> ~/.bash_profile

4. 設定を反映させる

$ exec "$SHELL"
This entry was posted in Linux, Python, 技術情報. Bookmark the permalink.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です