0
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 3 years have passed since last update.

macでpythonの仮想環境作成

Last updated at Posted at 2021-01-23

macでpythonの仮想環境を構築する

前提

・macOSでpythonの仮想環境を構築する
・今までanacondaで仮想環境を作っていたが、ふとターミナルで仮想環境を作るには?と思い調べた

手順

1.仮想環境の作成

1-1.仮想環境を作りたいディレクトリまで移動
お馴染みのcd
1-2.ターミナルに以下のコードを入力

python3 -m venv 環境名(例:.venv)

2.仮想環境の起動

. .venv/bin/activate

3.終了

deactivate

##最後に
今までpythonの実行をanacondaのspyderというIDEを使っていたため、急にターミナルやVScodeで実行するのに少し抵抗があったが、少しずつ慣れていきたい

0
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
0
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?