我已经卸载conda和anaconda了,powershell报错找不到conda解决办法

11 次阅读

本文最后更新于 2026年5月4日。

我已经卸载conda和anaconda了,还报错

*  还原的历史记录 

& : The term 'C:\ProgramData\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\weiyo\Documents\WindowsPowerShell\profile.ps1:4 char:4
+ (& "C:\ProgramData\Anaconda3\Scripts\conda.exe" "shell.powershell" "h ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\ProgramData\...ripts\conda.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

解决办法

  1. 打开文件资源管理器

  2. 在地址栏直接粘贴并回车:

    %UserProfile%\Documents\WindowsPowerShell\

  3. 在这个文件夹里,你应该能看到一个名为 profile.ps1Microsoft.PowerShell_profile.ps1 的文件。

  4. 右键点击它,选择“使用记事本打开”。

  5. 删掉里面所有关于 conda 的内容。