0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

pyenv インストール 忘備録

Posted at

###pyenv インストール


経緯
インストールの際に、全然切り替えができなかくて、2.3時間かかってしまった。
(progateを見てやったんだけど、全然できへんやん、、、)


brew install pyenv

pyenv install 3.8.5

pyenv versions 
 * system (set by ~/.pyenv/version)
 3.8.5

pyenv global 3.8.5
 system (set by ~/.pyenv/version)
 * 3.8.5
python --version
 python 2.7.5

#あれ、、、、
#切り替わってないやん、、、、

#####切り替えることができた方法
上記の方法をしてから、以下をしていくと成功した。

pyenv int

# (The below instructions are intended for common
# shell setups. See the README for more guidance
# if they don't apply and/or don't work for you.)

# Add pyenv executable to PATH and
# enable shims by adding the following
# to ~/.profile and ~/.zprofile:

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"

# Load pyenv into the shell by adding
# the following to ~/.zshrc:

eval "$(pyenv init -)"

# Make sure to restart your entire logon session
# for changes to profile files to take effect.

ここに書いてる通りやってみよ〜

vim .zprofile 
#以下を記述〜
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
#:wq で保存


vim .zshrc
#以下を記述〜
eval "$(pyenv init -)"
#wqで保存

ここで完了したと思ってたけど、ロードするおまじないを忘れてた自分ので一応書いておこーう

source .zshrc
sorce .zprofile


確認〜

python --version
3.8.5

2,3時間かかってしまった、、、
まぁ、解決できてよかった。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?