When running a Python script inside a virtual environment in Visual Studio Code, it shows the following error in the terminal:
env\Scripts\Activate.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
One option is to change the ExecutionPolicy. Another option is use set cmd as the default terminal instead of powershell. Personally I prefer the latter.
To change the default terminal:
- Ctrl + Shift + P
- type: Select Default Shell
- select Command Prompt
No comments:
Post a Comment