【问题标题】:After removing Anaconda3 I still get these errors in PowerShell删除 Anaconda3 后,我仍然在 PowerShell 中收到这些错误
【发布时间】:2021-03-15 21:51:55
【问题描述】:

打开 Visual Studio 时出现以下错误。我该怎么做才能完全删除默认值?我已经尝试过重新安装和卸载 Anaconda3、所有版本的 Python 和 Visual Studio

我想在没有 Anaconda 的情况下从头开始?

Windows PowerShell 版权所有 (C) 微软公司。保留所有权利。

Try the new cross-platform PowerShell https://aka.ms/pscore6

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

【问题讨论】:

  • 您可以编辑您的 Microsoft.VSCode_profile.ps1 文件(在编辑器中键入 $profile 并删除所有引用 anaconda 的代码时可以找到完整路径。要打开配置文件,请键入 @987654323 @ 在终端中。更改后,保存文件并重新启动 VSCode
  • 感谢您的帮助...这是文件上显示的信息。我应该删除所有内容吗?
    #region conda 初始化 # !!此块中的内容由“conda init”管理! (& "C:\Users\Name\Anaconda3\Scripts\conda.exe" "shell.powershell" "hook") |外串 |调用表达式#endregion
  • 如果这是配置文件的全部内容,那么是的,完全清除它。如果还有更多,您可能希望保留其余部分(如果与 conda 无关),只需删除以 #region 开头(包括)并以 #endregion 结尾的部分

标签: python-3.x powershell visual-studio-code anaconda3


【解决方案1】:

C:\Users[用户名]\Documents\WindowsPowerShell

删除那里的文件

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-05
    • 2019-04-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多