I am running Visual Studio Code in windows 10 environment.
I am trying to set up VsCode to activate venv when I create a new terminal or I open VsCode.
Here is some settings in .vscode/settings.json
"python.pythonPath": "venv\\Scripts\\python.exe",
"python.defaultInterpreterPath": "venv\\Scripts\\python.exe",
"python.terminal.activateEnvironment": true,
"python.terminal.activateEnvInCurrentTerminal": true,
The problem is it runs
c:/abs/path/to/project/venv/Scripts/Activate.ps1
that returns
& was unexpected at this time.
instead of
c:/abs/path/to/project/venv/Scripts/Activate
that activates the virtual environment
I am using company laptop with limited access so I can not have access to registry and fix it.
So, the question is, how to make VsCode use
c:\abs\path\to\project\venv\Scripts\Activate
Note: if I run c:/abs/path/to/project/venv/Scripts/Activate
it activates venv for me