更新conda时出现AssertionError

时间:2019-07-07 01:17:48

标签: conda

我尝试使用以下命令更新conda:

~$ conda update conda

它输出以下消息:

WARNING conda.base.context:use_only_tar_bz2(632): Conda is constrained to only 
using the old .tar.bz2 file format because you have conda-build installed, 
and it is <3.18.3.  Update or remove conda-build to get smaller downloads 
and faster extractions.
Collecting package metadata (repodata.json): done
Solving environment: - 

The environment is inconsistent, please check the package plan carefully

The following packages are causing the inconsistency:

- defaults/linux-64::cytoolz==0.9.0.1=py37h14c3975_1

- and around 100 more

Preparing transaction: done

Verifying transaction: done

Executing transaction: done

ERROR conda.core.link:_execute(637): An error occurred while installing 
package 'None'.

AssertionError()

Attempting to roll back.

Rolling back transaction: done

AssertionError()

我也尝试过

~$ conda update --all

但是它给了我与以前相同的错误。

4 个答案:

答案 0 :(得分:5)

关于这件事,我找到了一个解决方法,虽然没有很好的解释,但是可以解决问题:

首先:使用命令:

(0, 2), (2, 4)

这解决了环境不一致的问题。

second:使用命令:

~$ conda install anaconda 

该命令将被正确执行,并且conda将会被更详细地更新。

答案 1 :(得分:0)

这些命令使我无法conda安装软件包,导致“'setuptools'是conda的依赖项,无法从conda的操作环境中删除。”

conda install tensorflow-gpu==1.9.0
pip install setuptools==38.6.0 

然后我尝试那些...

conda update -f conda
conda install -f codna

第二行可以帮助我解决问题。 我正在寻找原因。

答案 2 :(得分:0)

我遇到了同样的问题(Ubuntu),穆罕默德的解决方案对我不起作用。 This answer工作了!

$ conda install anaconda
$ conda update conda-build

答案 3 :(得分:0)

我遇到了同样的错误,并且我使用了miniconda,所以我不想安装anaconda。我将python从3.6更新到3.7的工作如下:

$ conda install python=3.7

当我这样做时,conda会自动更新为最新版本。