3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

vscodeでのPython仮想環境の作成

Posted at

目次

  • Pythonのインストール
    • インストール
    • 環境設定
  • VSCodeのインストール
    • インストール
    • 基本的な設定
  • 仮想環境の作成

Pythonのインストール

1.https://www.python.org/ へアクセス
2.Downloadsから最新のversionをダウンロード
image.png
3.ダウンロードしたインストーラー(.exe)を実行
4.

VSCodeのインストール

1.https://code.visualstudio.com/ へアクセス
2.Download for Windowsからダウンロード
3.ダウンロードしたインストーラー(.exe)を実行

仮想環境の作成

1.作業で使用するフォルダを作成、VSCodeで開く
2.ターミナルでコマンドを実行

python -m venv venv01
ターミナルの開き方

Terminal→New Terminalで開ける

実行コマンド

実行コマンドの「venv01」の箇所は自由に変更して問題ない
3.VScode上で自分の作成した仮想環境が反映されているか確認
赤線部に自分で作成した名前のものが含まれていれば問題ない
image.png
※反映されていなさそうな場合
View→Command Palette...→Python: Select Interpreter
以下の画面が表示されるので、自分の作成した仮想環境を探し、選択する
image.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?