LoginSignup
0
0

More than 1 year has passed since last update.

pyenv-virtualenvのインストール

Last updated at Posted at 2021-07-28

はじめに

pyenv再インストールしたので、ついでにpyenv-virtualenv(link)もインストールしてみる。

環境

macOS: Catalina 10.15.7
xCode: version 12.4

インストール

Homebrewでインストール。

terminal
$brew install pyenv-virtualenv

以下を.bashrcに書き込む。

.bashrc
eval "$(pyenv virtualenv-init -)"                                                                                                                                                                         

使い方

仮想環境の作り方

terminal
# Determine python version and create virtualenv
$ pyenv virtualenv 2.7.10 my-virtual-env-2.7.10
# Create vertualenv from current version
$ pyenv virtualenv venv34

仮想環境の確認方法

terminal
$ pyenv virtualenvs

仮想環境のActivateとDeactivate

terminal
$ pyenv activate <name>
$ pyenv deactivate

仮想環境の消し方

terminal
$ pyenv uninstall <name>
0
0
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
0
0