anaconda conda:错误:参数命令:尝试更新软件包时选择无效 [英] anaconda conda: error: argument command: invalid choice when trying to update packages

查看:221
本文介绍了anaconda conda:错误:参数命令:尝试更新软件包时选择无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ubuntu 18 和 anaconda for python 3.6 并尝试更新软件包,当我尝试使用

conda update --all

我收到此错误

<块引用>

conda:错误:参数命令:无效选择:'/home/user/anaconda3/bin/conda'

我尝试按照this github问题中的解释来解决它>

使用

$ conda 更新 anaconda-navigator$ conda update navigator-updater

但得到同样的错误.我尝试添加-c conda-forge 到所有命令并尝试使用康达更新蟒蛇康达升级蟒蛇

并且一直出现相同的错误.

这是我的 github issue

谢谢!

更新:即使尝试使用 this 来安装 anaconda-clean 并删除 anaconda,我尝试安装 conda-clean 时遇到同样的错误,这应该可以帮助我从机器中删除 anaconda

解决方案

更新的答案:

对于 Linux 用户,我实际上发现删除了 .bashrc 中 conda 添加的所有行,而不是 export PATH="/home/<user>/anaconda3/bin:$PATH" 成为最好的解决方案.

以前的答案:

不确定它是否适合所有人,但我通过运行 /home//anaconda3/bin/conda install anaconda-clean(或存储 conda 文件的任何位置)解决了这个问题),并且从安装的软件包中,问题神奇地消失了.

如果这不起作用,请尝试完全"卸载 anaconda (https://docs.anaconda.com/anaconda/install/uninstall/),重新安装它,然后尝试执行我上面建议的操作.

I am using ubuntu 18 with anaconda for python 3.6 and trying to update packages, when I try to do so using

conda update --all 

I am getting this error

conda: error: argument command: invalid choice: '/home/user/anaconda3/bin/conda'

I tried so solve it like explained in this github issue

using

$ conda update anaconda-navigator
$ conda update navigator-updater

But getting the same error. I tried adding -c conda-forge to all the commands And tried using conda update anaconda conda upgrade anaconda

and getting the same error all the time.

Here is my github issue on this

Thanks!

update: even when trying to use this to install anaconda-clean and removing anaconda, I am getting the same error when trying to install conda-clean that should help me remove anaconda from my machine

解决方案

UPDATED ANSWER:

For Linux users I actually found that deleting all the lines added by conda in the .bashrc other than export PATH="/home/<user>/anaconda3/bin:$PATH" to be the best solution for this.

PREVIOUS ANSWER:

Not sure it's a fix for everyone, but I got around this by running /home/<user>/anaconda3/bin/conda install anaconda-clean (or wherever your conda file is stored), and from the packages this installed, the problem magically disappeared.

If that doesn't work, try doing a 'full' uninstall of anaconda (https://docs.anaconda.com/anaconda/install/uninstall/), reinstall it, then try doing what I suggested above.

这篇关于anaconda conda:错误:参数命令:尝试更新软件包时选择无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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