3
3

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 5 years have passed since last update.

pyenvでPythonバージョン管理

3
Last updated at Posted at 2018-08-04

前提条件

homebrewインストール済み

pyenvインストール

$ brew install pyenv

PYENV_ROOTを設定

$ cat << 'EOS' >> ~/.bash_profile
> export PYENV_ROOT=/usr/local/var/pyenv
> if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
> EOS
$ source ~/.bash_profile

インストールできるversion一覧表示

$ pyenv install --list

Pythonインストール

$ pyenv install 3.7.0

バージョン切り替え

切り替え可能なバージョン一覧を表示します。

$ pyenv versions
* system (set by /usr/local/var/pyenv/version)
  3.7.0

バージョン切り替え

$ pyenv global 3.7.0

バージョン確認

$ python --version
Python 3.7.0

無事インストールできました。

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?