LoginSignup
7
7

More than 5 years have passed since last update.

pythonbrewでの複数バージョン&ライブラリ管理メモ

Posted at

1.ダウンロード&インストール

$ curl -kL http://xrl.us/pythonbrewinstall | bash
  1. .bashrc, .zshrcに設定を追加
[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc
  1. pythonbrewに複数バージョンをインストール
$ pythonbrew install 2.7.3
$ pythonbrew install 3.2.3

4.pythonのバージョンきりかえ

$ pythonbrew switch 2.7.3 #2.7.3を使う
$ pythonbrew switch 3.2.3 #3.2.3を使う

5.ライブラリ複数管理方法

$ pythonbrew venv create sample1 #現在利用しているバージョンでvenv(sample1)を作成できる。作成後はpipでライブラリ管理が行える
$ pythonbrew venv use sample1 #venvのsample1を利用する
$ pythonbrew venv list #venvの現存リストを表示する

$ pip install Django #利用しているvenv環境にDjangoがインストールされる
7
7
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
7
7