183
162

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バージョンの変更

Posted at

参考:pyenvとvirtualenvで環境構築

###インストール出来るバージョンの確認

% pyenv install --list

###それぞれのバージョンのpythonのインストール

$ pyenv install 3.5.0 $ pyenv install 2.7.10

###切り替えられるpythonのバージョンの確認

% pyenv versions  
  system  
  2.7.10  
* 3.5.0 (set by /Users/xxx/.pyenv/version)  

###現在のバージョンの確認

% python --version                        
Python 3.5.0

###pythonのバージョンの切り替え
globalとすると全体に、localにするとそのカレントディレクトリに指定したバージョンが反映されます。

$ pyenv global 3.5.0
$ python --version
Python 3.5.0

$ pyenv local 2.7.10
$ python --version
Python 2.7.10
183
162
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
183
162

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?