我的组织似乎禁止使用很多东西。尝试在 VSC 中启动 python 脚本返回错误
终端进程启动失败:发生本机异常 启动期间(无法启动 conpty)。
在寻找答案时,我在这个问题中找到了解决方案,其中有人说更改为使用cmd,或者仅使用配置文件。所以我切换到命令提示符作为默认配置文件并且
"terminal.integrated.defaultProfile.windows": "命令提示符"
在 settings.json 中添加,但当我尝试启动 python 脚本时仍然返回相同的错误。
我应该改变什么才能在 VSCode 中自由使用 python? 我可以使用我的用户的 cmd.exe,但没有管理员权限。
我遇到了完全相同的问题,我的解决方案是允许
\\?\C:\Windows\System32\conpty.exe
通过具有无限制级别的软件限制策略。
在settings.json中更改或dsiable conpty
{
// "terminal.integrated.shell.windows": "C:\Program^ Files\Git\bin\bash.exe",
"terminal.integrated.shell.windows": "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe",
"terminal.integrated.windowsEnableConpty": false
}