尝试在 vs 代码上使用 conda 时出错:conda:术语 'conda' 未被识别为 cmdlet 的名称
Error when trying to use conda on vs code: conda : The term 'conda' is not recognized as the name of a cmdlet
我正在尝试构建一个基本的机器学习算法,为此我使用了 python 的 anaconda 解释器。但是,即使 visual studio 代码似乎已将 conda 识别为解释器,并且我将 anaconda3 shell 作为单独的应用程序工作,但我无法让 conda 在 vs 代码上工作。每当我尝试检查 conda 时,都会收到以下错误:
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ conda activate base
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我已经尝试了此处链接的修复程序:
但是,它们对我不起作用。我尝试将 conda 设置为我的路径,但我仍然遇到同样的错误。提前致谢!
尝试以下操作:
- 运行 Anaconda/Miniconda
- 激活那里的环境:
conda activate your-env
- 启动 Visual Studio 来自 Anaconda/Miniconda 终端的代码:
code
然后 Visual Studio 代码应该识别 conda
:
我正在尝试构建一个基本的机器学习算法,为此我使用了 python 的 anaconda 解释器。但是,即使 visual studio 代码似乎已将 conda 识别为解释器,并且我将 anaconda3 shell 作为单独的应用程序工作,但我无法让 conda 在 vs 代码上工作。每当我尝试检查 conda 时,都会收到以下错误:
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ conda activate base
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (conda:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我已经尝试了此处链接的修复程序:
但是,它们对我不起作用。我尝试将 conda 设置为我的路径,但我仍然遇到同样的错误。提前致谢!
尝试以下操作:
- 运行 Anaconda/Miniconda
- 激活那里的环境:
conda activate your-env
- 启动 Visual Studio 来自 Anaconda/Miniconda 终端的代码:
code
然后 Visual Studio 代码应该识别 conda
: