1
1

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 1 year has passed since last update.

仮想環境を作成〜削除のやり方 -Python

Last updated at Posted at 2022-05-28

概略

Pythonの仮想環境の作成機能のvenvを用いて
仮想環境の作成、有効化、無効化、削除までをまとめた。
※今回の記事はUNIX系OSのためWindows版は他の記事をあたってください

仮想環境の作成

python3 -m venv env

仮想環境の有効化

zshの場合

source env/bin/activate

bashの場合

. env/bin/activate

仮想環境を有効化したら下記コマンドを実行しpipを最新化します

pip3 install --upgrade pip

必要があれば、Djangoなど開発に必要なパッケージをインストールしてください

pip3 install Django

仮想環境の無効化

deactivate

仮想環境の削除

rm -rf env
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?