【发布时间】:2021-10-02 17:10:22
【问题描述】:
我正在尝试在 vs-code 下设置 conda 环境。我已经设置了python interpreter,不幸的是,vscode terminal 中没有环境指示
你知道如何修复它并正确配置它吗?
谢谢。
【问题讨论】:
标签: visual-studio-code terminal anaconda
我正在尝试在 vs-code 下设置 conda 环境。我已经设置了python interpreter,不幸的是,vscode terminal 中没有环境指示
你知道如何修复它并正确配置它吗?
谢谢。
【问题讨论】:
标签: visual-studio-code terminal anaconda
感谢您帮助我,这里是所有过程修复:
应用命令:
conda init Powershell
然后关注Fix Error PS1 Can Not Be Loaded Because Running Scripts Is Disabled
set-ExecutionPolicy RemoteSigned -Scope CurrentUserGet-ExecutionPolicy我确实在 vs-code 终端有correct output :)
【讨论】:
在您可以使用之前激活您的环境非常重要。如果您的终端没有显示环境前缀,只需尝试再次启动终端。如果您也安装了 coderunner 扩展,这尤其是一个问题。
如果这没有帮助,请尝试
conda init powershell
然后重启终端。
【讨论】:
conda init powershell 之后出现错误消息:: 文件 C:\Documents\WindowsPowerShell\profile.ps1 无法加载,因为在此系统上禁用了运行脚本。有关详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkID=135170 上的 about_Execution_Policies。在 line:1 char:3 + 。 'C:\Documents\WindowsPowerShell\profile.ps1' + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess