【发布时间】:2021-06-24 13:43:16
【问题描述】:
我在使用 Windows 10 Powershell 时遇到问题。每当我打开它时,都会出现错误:
& : The term 'C:\Users\hp\anaconda3\Scripts\conda.exe' 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 C:\Users\hp\Documents\WindowsPowerShell\profile.ps1:4 char:4
+ (& "C:\Users\hp\anaconda3\Scripts\conda.exe" "shell.powershell" "hook ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\hp\anaconda3\Scripts\conda.exe:String) [], CommandNotFoundExce
ption
+ FullyQualifiedErrorId : CommandNotFoundException
之前我安装了 anaconda 和 vs 代码以在 python 中工作,但后来我卸载了 anaconda 并从 https://www.python.org/downloads/ 下载了 python3。
我在 Path 中添加了 Python 的环境变量,但在 Powershell 中仍然出现此错误。
如何解决这个问题?
【问题讨论】:
-
等等,你需要 conda 还是常规的 python 解释器,或者两者都需要?
-
我需要一个 python 解释器。
-
如果您可以根据您的用例在 conda 和 python 之间做出选择,我可以帮助您设置其中之一
-
我的大部分工作都与数据分析和构建机器学习和深度学习模型有关,我是第一次使用 vs code,你能建议 conda 和 python 哪个更好吗? @dopewind
-
对于机器学习,我绝对会推荐 conda,因为它有许多专门为机器学习构建的 Python 内置库。
标签: python windows powershell visual-studio-code anaconda