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

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

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


f6f900c9ca8b4621991b2af169f15858.png


无论怎么安装都无法解决上述问题,本着可能是源的问题以及哪一步安装版本的问题,调试了一通后,解决了安装库失败的问题:

首先是恢复默认源:


恢复默认源:

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


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


def4a2d374af40e68f23e4406ec10d32.png


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


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


conda install --revision [0]


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

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

相关文章
|
9月前
|
Linux iOS开发 MacOS
pnpm全局安装报错:Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PN
pnpm全局安装报错:Run “pnpm setup“ to create it automatically, or set the global-bin-dir setting, or the PN
2485 0
|
数据库管理
SVN 执行cleanup报错:Cleanup failed to process the following paths : 解决方法
引用:https://www.cnblogs.com/pinpin/p/11395438.html 在SVN更新时提示文件被锁住了,要求执行 clean up操作,执行clean up时又报clean up failed。造成的原因是在某次更新后,点击了cancel按钮,操作没有完成所以会锁住。解决方法如下:
1587 0
|
Python
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
447 0
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
|
7月前
|
数据库 开发工具 开发者
【Python】已解决:You have 18 unapplied migration(s). Your project may not work properly until you apply t
【Python】已解决:You have 18 unapplied migration(s). Your project may not work properly until you apply t
315 0
|
8月前
|
编译器
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
“Could not determine which ”make“ command to run. Check the ”make“ step in the build configuration.”
124 0
|
Python
Your requirements could not be resolved to an installable set of packages
Your requirements could not be resolved to an installable set of packages
8547 1
|
C++ iOS开发
报错解决:Could not build wheels for soxr, which is required to install pyproject.toml-based projects(可用)
链接如下:【金山文档】 1-Microsoft Visual C++ Build Tools。找了好久,才找到正确的解决方案,网上一大堆升级setuptools的方法只对少数人管用。注意,虽然我的这个报错内容有点长,但是我感觉和其它的。如果网页提示登录,可以不用登录,直接下载即可。然后打开镜像ios文件(双击即可)错误是一样的解决方案。文件,打开后安装即可。
2857 1
报错解决:Could not build wheels for soxr, which is required to install pyproject.toml-based projects(可用)
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
|
资源调度
No change to package.json was detected. No package manager install will be executed.怎么解决
这个提示是由于没有对 package.json 文件进行更改所导致的,因此无需运行包管理器的安装。
463 0
【解决方案】成功解决ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects报错信息
成功解决ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects报错信息
【解决方案】成功解决ERROR: Could not build wheels for opencv-python, which is required to install pyproject.toml-based projects报错信息