When you choose to use a python venv virtual environment in vscode, you might run into the error below :
The file C:\yourpath\.env\Scripts\Activate.ps1 is not digitally signed. You cannot run this script on the current system.
{:class=“img-responsive”}
A quick solution is to add this to your vscode settings.json{:class=“lnk”} file :
{
"terminal.integrated.shellArgs.windows": [
"-ExecutionPolicy",
"Bypass"
],
}
You should restart your vscode and you’ll know you succeeded if you see the popup shown in the image below. Click allow and restart vscode again and you should be able to start your venv virtual environment without issues.
{:class=“img-responsive”}
Credit : https://stackoverflow.com/a/56199112{:class=“lnk”}