如何将anaconda powershell添加到vscode? [英] How to add anaconda powershell to vscode?

查看:41
本文介绍了如何将anaconda powershell添加到vscode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试添加 anaconda 提示符来启动而不是 powershell,以避免将 python 添加到 env 变量中.

I'm trying to add anaconda prompt to start up instead of powershell to avoid having to add python to env variables.

"terminal.integrated.shellArgs.windows": [
    <args>
]

我尝试将它们放在单行中,将它们拆分为-Foo Goo"以及-Foo"、Goo".每个版本都会导致错误或简单地忽略-Command"参数(这些行只是被粘贴,但未执行).

I tried putting them into single line, splitting them "-Foo Goo" as well as "-Foo","Goo". Each version leads to either error or simply ignoring the "-Command" parameter (the lines simply get pasted, but not executed).

推荐答案

我最终使用了这个(虽然它有损坏的倾向).

I ended up using this (although it has tendency to break).

"terminal.integrated.shellArgs.windows": [
    "-ExecutionPolicy"
    , "ByPass" 
    , "-NoExit"
    , "-Command"
    , "& 'C:\ProgramData\Anaconda3\shell\condabin\conda-hook.ps1' ; conda activate 'C:\ProgramData\Anaconda3'"
],

这篇关于如何将anaconda powershell添加到vscode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆