栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

如何解决 conda install 库时报错:The environment is inconsistent, please check the package plan carefully

在使用conda 安装库时,遇到了这样的问题:

无论怎么安装都无法解决上述问题,本着可能是源的问题以及哪一步安装版本的问题,调试了一通后,解决了安装库失败的问题:
首先是恢复默认源:
恢复默认源:
conda config --remove-key channels
并添加新的中科大源或者其他国内源,随便找一下有很多:

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes

同时,将conda版本恢复到之前没有问题的版本:

conda list --revisions

运行上面这一行,可以显示之前所有的安装版本,以及相应的时间如下所示:

conda install --revision [revision number你要选择返回的版本]

如何通过上面这一行命令,返回到最近没有问题的版本,我这里直接返回到最开始的版本“

conda install --revision [0]

两部操作之后,再次进行conda install xx 相应的库就可以了。

起码是解决了我遇到的问题,但是不一定能够适用所有其他情况,有其他更好的办法可以留言评论交流~~

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/326433.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号