卸载 anaconda 后 Cmd 崩溃,退出代码为 1 [英] Cmd crashes with exit code 1 after uninstalling anaconda

查看:329
本文介绍了卸载 anaconda 后 Cmd 崩溃,退出代码为 1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的 Win10 Pro 机器上遇到了这个问题.我卸载了 Anaconda,因为它给我的 Jupyter 笔记本带来了问题并重新安装了它.但是从那以后我无法访问命令提示符.

I got this problem in my Win10 Pro Machine. I uninstalled Anaconda because it gaves me problem with Jupyter notebook and reinstalled it. But since then I'm unable to access Command Prompt.

我一打开它就关闭了.我发现打开 VSCode 并读取 Cmd has exited with error code 1.现在,Anaconda Prompt 也没有启动,但是一旦我打开 PowerShell,它就会显示 (conda),所以我认为它可以从那里工作.

As soon as I open it it closes. I figure it out opening VSCode and reading Cmd has exited with error code 1. And now nor Anaconda Prompt is starting up, but as soon as I open PowerShell it's says (conda) so I think it works from there.

如果我输入 cmd 从 Powershell 并立即退出而不会抱怨任何事情.但是如果我输入 cmd/d 就可以了.

From Powershell if i type in cmd and it exit immediately without complaining about anything. But if I type cmd /d it works.

  • 从路径中移除 Anaconda
  • 我在这里读到它可能是由 cmd 启动时的某种错误命令引起的,实际上 cmd/d 正常工作.
  • 我尝试按照有关 cmd 启动命令的注册表修复,但在我的情况下缺少注册表项也许这可能是问题
  • sfc/scannowDISM.exe/Online/Cleanup-image/Scanhealth 均无效
  • Removing Anaconda from path
  • I read somewhere here that it may be caused by some kind of bad command on cmd startup and in fact with cmd /d works as usual.
  • I tried to follow the registry fix about startup commands for cmd but the registry entry was missing in my case maybe this could be the issue
  • Neither sfc /scannow nor DISM.exe /Online /Cleanup-image /Scanhealth worked

根据 此网站 ErrorCode 1 '表示 Action 已尝试在 Windows 命令提示符 cmd.exe 中执行无法识别的命令'.

According to this website ErrorCode 1 'Indicates that Action has attempted to execute non-recognized command in Windows command prompt cmd.exe'.

谁能帮我解决这个问题?我试图在网上寻找一个星期,但没有运气,谢谢你的时间

Can anyone help me with this issue please? I tried to look online for a week but with no luck, thank you for your time

推荐答案

下面的答案(据说)最初是由@Mofi 发布(但后来被删除)的,我是从@filippo-vicari 的评论中得到的.所以所有的功劳都归他们所有,感谢您解决了这个问题!我花了好几个小时才终于找到他们的解决方案.

The following answer was (supposedly) initially posted (but later removed) by @Mofi and I got it from the comment of @filippo-vicari. So all credits go to them, thanks for solving this issue! It took me hours to finally find their solution.

在仍在工作的 powershell 中输入以下命令(在我的例子中是 Anaconda Powershell):

Enter the following command into the still working powershell (in my case Anaconda Powershell):

C:WindowsSystem32
eg.exe DELETE "HKCUSoftwareMicrosoftCommand Processor" /v AutoRun /f

它立即对我有用.cmd.exe 和 Anaconda Prompt 现在再次完美运行!

It worked for me immediately. cmd.exe and Anaconda Prompt now work flawlessly again!

这篇关于卸载 anaconda 后 Cmd 崩溃,退出代码为 1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆