Python、Windows:术语“conda”不能识别为cmdlet的名称

2024-04-27 02:26:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我面临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中出现了此错误

如何解决这个问题


Tags: orofthepathnameis错误scripts
1条回答
网友
1楼 · 发布于 2024-04-27 02:26:08

卸载任何其他python解释器安装并重新启动以刷新环境变量

here下载Anaconda安装程序

如果您想在Anaconda Navigator之外使用它,您应该将它添加到PATH中,我建议您使用管理员权限在系统范围内安装它

Installation screen

Installation 2

这将向路径中添加一个可执行文件,允许在系统范围内调用它

相关问题 更多 >