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.

VSCodeでPythonの仮想環境に切り替える

Posted at

背景

VSCodeを立ち上げて仮想環境を実行する度にPowerShell スクリプトの実行ポリシー変更するのが面倒

やった事

F1 キーでコマンドパレットを表示。
"Open Settings(JSON)"を入力してsettings.jsonを開いて下記を追加

Windows
"terminal.integrated.env.windows": {
        "PSExecutionPolicyPreference": "RemoteSigned"
}

あとは、PowerShell で仮想環境のactivate 用スクリプトを実行すればよい。
例)./venv/Scripts/Activate.ps1

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?