首页 » 技术分享 » Anaconda:The environment is inconsistent, please check the package plan carefully的解决办法

Anaconda:The environment is inconsistent, please check the package plan carefully的解决办法

 

问题描述

昨天晚上,打开Anaconda的时候,提示可以从1.9.6更新到1.9.7,于是选择了更新,结果出现Available Invalid Channel的错误提示,于是在terminal里输入conda update --prefix /Users/用户名/anaconda3 anaconda后,显示我的源不可用,这才发现原来国内的清华源和中科大源都已经因为授权问题停止服务了,所以我就删除了channel list中清华和中科大的源conda config --remove-key channels,中科大的通知如下

由于Anaconda的软件源设计缺陷,其缺少正常发行版软件源所包含的签名校验功能,任何非官方网站提供的软件包都有可能被篡改过,产生安全隐患。[1]
另根据Anaconda软件源上的说明,Anaconda和Miniconda是Anaconda, Inc.的商标,任何未经授权的公开镜像都是不允许的。[2][3]
出于服务质量和合规性的考虑,我们决定无限期停止Anaconda镜像服务。
为了最少限度给用户造成影响,即日起本站Anaconda镜像将被直接重定向至官方镜像仓库[4],请使用本站镜像的用户尽快更改。
[1]: https://github.com/ustclug/mirrorrequest/issues/228
[2]: https://github.com/tuna/issues/issues/112
[3]: https://mirrors.tuna.tsinghua.edu.cn/news/close-anaconda-service/
[4]: https://repo.continuum.io/

在这段通知中的[4],提到了这个是官方镜像库,于是我就把这个库添加到了我的channel list,然后根据提示运行了conda update -n base -c defaults conda,注意这是万恶之源,随后进行的所有操作都提示如下图(从stack overflow上复制的别人的情况,和我如出一辙)

WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:

  - defaults/win-64::anaconda==5.3.1=py37_0
  - https://mirrors.ustc.edu.cn/anaconda/pkgs/free/win-64::anaconda-navigator==1.6.4=py36_0
  - defaults/win-64::astropy==3.0.4=py37hfa6e2cd_0
  - defaults/win-64::blaze==0.11.3=py37_0
  - defaults/win-64::bottleneck==1.2.1=py37h452e1ab_1
  - defaults/win-64::dask==0.19.1=py37_0
  - defaults/win-64::datashape==0.5.4=py37_1
  - defaults/win-64::h5py==2.8.0=py37h3bdd7fb_2
  - defaults/win-64::imageio==2.4.1=py37_0
  - defaults/win-64::matplotlib==2.2.3=py37hd159220_0
  - defaults/win-64::mkl-service==1.1.2=py37hb217b18_5
  - defaults/win-64::mkl_fft==1.0.4=py37h1e22a9b_1
  - defaults/win-64::mkl_random==1.0.1=py37h77b88f5_1
  - defaults/win-64::numba==0.39.0=py37h830ac7b_0
  - defaults/win-64::numexpr==2.6.8=py37h9ef55f4_0
  - defaults/win-64::numpy-base==1.15.1=py37h8128ebf_0
  - defaults/win-64::odo==0.5.1=py37_0
  - defaults/win-64::pandas==0.23.4=py37h830ac7b_0
  - defaults/win-64::patsy==0.5.0=py37_0
  - defaults/win-64::pytables==3.4.4=py37he6f6034_0
  - defaults/win-64::pytest-arraydiff==0.2=py37h39e3cac_0
  - defaults/win-64::pytest-astropy==0.4.0=py37_0
  - defaults/win-64::pytest-doctestplus==0.1.3=py37_0
  - defaults/win-64::pywavelets==1.0.0=py37h452e1ab_0
  - defaults/win-64::scikit-image==0.14.0=py37h6538335_1
  - defaults/win-64::scikit-learn==0.19.2=py37heebcf9a_0
  - defaults/win-64::scipy==1.1.0=py37h4f6bf74_1
  - defaults/win-64::seaborn==0.9.0=py37_0
  - defaults/win-64::statsmodels==0.9.0=py37h452e1ab_0

出现类似这样的提示,然后就停止在这个状态。

解决方法

随后我发现,这个官方镜像库(不知道真假)提供的库都是过时的老版本,导致我在使用这个库的时候,反而把我的pkg版本滚回原来的老版本导致出现问题,下面提供解决办法。

  1. 首先,输入conda list -r查询之前的更新版本,然后选择一个之前的版本(出现问题之前),输入conda install --revision 数字之后等待回滚成功后。
  2. 删除之前添加的所有channel
  3. 之后进行正常操作,可能速度有些慢,但是比较稳定。

最后,希望国内源的问题可以早日解决,毕竟之前两个源都做得不错!
PEACE~~~

转载自原文链接, 如需删除请联系管理员。

原文链接:Anaconda:The environment is inconsistent, please check the package plan carefully的解决办法,转载请注明来源!

0