29
33

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-virtualenvの使い方まとめ

Last updated at Posted at 2015-02-08

virtualenvwrapperというものがあって、みんなそれを使ってるみたいだ。

pythonの環境管理ツールは色々あって良く分からないのでvirtualenvだけ使った

インストール

brew install pyenv-virtualenv
.zshrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
pyenv install 3.4.2
pyenv global 3.4.2
pyenv versions
> system
> *3.4.2

環境作成

pyenv virtualenv 3.4.2 hogehoge
pyenv versions
> system
> *3.4.2
> hogehoge

virtualenvで切った環境とpyenvでインストールした環境が同列に出るのね

環境切り替え

cd workspace
pyenv local hogehoge # .python-version が作成される

環境削除

pyenv uninstall hogehoge
29
33
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
29
33

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?