LoginSignup
3
6

More than 5 years have passed since last update.

virtualenvとりあえずこれだけ!

Posted at

Pythonの仮想環境の作成で何度も躓いたので作成。

仮想環境作成の前に...

virtualenvをインストールする必要があるのでインストールする。

$ pip install virtualenv

仮想環境の作成

$ virtualenv <DIR>

仮想環境を起動

$ source <DIR>/bin/activate

仮想環境が起動すると以下のようにプロンプトの左側に仮想環境名が括弧つきで表示される。

(<DIR>) XXX:YYY UserName$ 

仮想環境を終了

$ deactivate

仮想環境を終了すると以下のようにプロンプト左側の仮想環境名の表示が消える。

XXX:YYY UserName$ 

参照

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