【发布时间】:2019-10-05 12:51:14
【问题描述】:
在 Visual Studio 代码中,我尝试从命令行执行 script.bat,但出现以下错误:
文件 C:\Thes_Repo\train-cnn\environment\Scripts\activate.ps1 无法加载,因为在此系统上禁用了运行脚本。
阅读this后,我尝试以管理员模式运行visual studio代码,认为问题出在权限问题上。但无论如何都会抛出错误。
【问题讨论】:
-
1.按下键盘上的 windows 按钮。 2. 输入‘PowerShell’ 3. 右键单击Windows PowerShell 4. 单击以管理员身份运行 5. 运行以下命令并用‘Y’确认 Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine 参考链接roelpeters.be/…
标签: powershell command-line visual-studio-code vscode-settings