LoginSignup
84
64

More than 1 year has passed since last update.

pyenv自身のバージョンを上げる

Last updated at Posted at 2017-03-27

#Pyenvとは
Pyenv自体はLL言語に良くある言語のバージョン管理を手軽にすることのできるツールです.

導入も簡単で,
1.git clone

$ git clone git://github.com/yyuu/pyenv.git ~/.pyenv

2.パスを通す

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

3.使用可能

$ pyenv
pyenv 1.0.3-119-gfe1bd31
Usage: pyenv <command> [<args>]

Some useful pyenv commands are:
   commands    List all available pyenv commands
   local       Set or show the local application-specific Python version
   global      Set or show the global Python version
   shell       Set or show the shell-specific Python version
   install     Install a Python version using python-build
   uninstall   Uninstall a specific Python version
   rehash      Rehash pyenv shims (run this after installing executables)
   version     Show the current Python version and its origin
   versions    List all Python versions available to pyenv
   which       Display the full path to an executable
   whence      List all Python versions that contain the given executable

See `pyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pyenv/pyenv#readme

#pyenv-update
pyenv自体がgitで管理されているので新しいバージョンをgit pullしてくるという手もありますが,すでに一発でアップデート出来るようにしてくれるプラグイン「pyenv-update」があります.

これまた簡単に導入でき,
1.git clone

$ git clone git@github.com:pyenv/pyenv-update.git ~/.pyenv/plugins/pyenv-update

2.アップデート

$ pyenv update
84
64
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
84
64