简体   繁体   English

Visual Studio Code 在卸载后一直尝试使用 conda.exe

[英]Visual Studio Code keeps trying to use conda.exe while it has been uninstalled

I have uninstalled conda(Miniconda3) and VSCode, after which I installed python manually and reinstalled VSCode.我已经卸载了 conda(Miniconda3) 和 VSCode,之后我手动安装了 python 并重新安装了 VSCode。 However VSCode keeps trying to use conda.exe whenever I start the editor or run the debugger.但是,每当我启动编辑器或运行调试器时,VSCode 一直尝试使用 conda.exe。

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

This is the error I keep getting.这是我不断收到的错误。 I have checked my global settings.json and local settings.json to no avail.我检查了我的全局设置。json 和本地设置。json 无济于事。 (Edit: conda.exe is not in my user Path or system PATH.) (编辑:conda.exe 不在我的用户路径或系统路径中。)

Interpreter When I manually activate the new env I created for Django it works.解释器当我手动激活我为 Django 创建的新环境时,它可以工作。

Kind regards, Victor亲切的问候,维克多

Is it still in your Windows Environment Variables?它还在您的 Windows 环境变量中吗?

You can check that by going to: System info > Advances > Environment Variables您可以通过以下方式检查:系统信息 > 高级 > 环境变量

Next, check for user and system if it is present.接下来,检查用户和系统是否存在。 Check the variabel Path or PATH in the system box, click edit, and see whether it is in there or not.检查系统框中的变量路径或路径,单击编辑,看看它是否在那里。 If so, remove Conda.exe from there.如果是这样,请从那里删除 Conda.exe。

I found the solution: In my documents folder there was a folder called "WindowsPowerShell" that had the following code:我找到了解决方案:在我的文档文件夹中有一个名为“WindowsPowerShell”的文件夹,其中包含以下代码:

#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "C:\ProgramData\Miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion

Removing this folder with file inside fixed the issue.删除包含文件的此文件夹解决了该问题。 I do not know how this got there.我不知道这是怎么到那里的。 Conda must have done this somehow.康达一定以某种方式做到了这一点。

  1. Go to C:\Users\<username>\Documents\WindowsPowerShell Go 到C:\Users\<username>\Documents\WindowsPowerShell
  2. Delete the file profile.ps1删除文件profile.ps1

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Conda.exe 运行失败,访问被拒绝 C:\Code\JiraData\ExecuteJiraExtract.ps1:31 char:1 - Conda.exe failed to run, access is denied C:\Code\JiraData\ExecuteJiraExtract.ps1:31 char:1 Conda 和 Visual Studio 代码调试 - Conda and Visual Studio Code debugging Visual Studio Code Jupyter 无法识别 conda kernel - Visual Studio Code Jupyter not recognising conda kernel "运行 PowerShell 时无法启动 conda.exe - 无效命令“挂钩”?" - Cannot start conda.exe when running PowerShell - invalid command 'hook'? 无法在 linux 上安装 anaconda,出现错误 path_to_dir/conda.exe : Permisison denied - Not able to install anaconda on linux, getting error path_to_dir/conda.exe : Permisison denied CommandNotFoundError:您的 shell 未正确配置为使用“conda activate” - CommandNotFoundError: Your shell has not been properly configured to use 'conda activate' Anaconda3 安装 - 安装过程中没有错误,但没有出现 anaconda 提示和导航菜单。 和_conda.exe - Anaconda3 Installation - no error during installation, but anaconda prompt and navigator menus don't appear. And _conda.exe 您的 shell 尚未正确配置为在 dockerfile 上使用“conda activate” - Your shell has not been properly configured to use 'conda activate' on dockerfile CommandNotFoundError:您的 shell 未正确配置为使用“conda activate” - CommandNotFoundError: Your shell has not been properly configured to use 'conda activate' 即使未安装,Visual Studio Code 也会尝试激活 conda base - Visual Studio Code tries to activate conda base even though it is not installed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM