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

编程入门 行业动态 更新时间:2024-10-27 21:22:05

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

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

conda config --add channels https://mirrors.ustc.edu/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu/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 相应的库就可以了。

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

更多推荐

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

本文发布于:2023-06-10 19:02:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/645342.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何解决   时报   conda   install   environment

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!