如何解决 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 相应的库就可以了。

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

相关文章
|
3月前
|
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
504 0
|
7月前
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
问题提解决:ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host=‘files.pythonhos
|
5月前
|
Python
Python安装库Could not find a version that satisfies the requirement requests (from versions: none)
Python安装库Could not find a version that satisfies the requirement requests (from versions: none)
|
8月前
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
成功解决Failed to execute stage ‘Setup validation’: Cannot locate gluster packages
|
8月前
|
资源调度
No change to package.json was detected. No package manager install will be executed.怎么解决
这个提示是由于没有对 package.json 文件进行更改所导致的,因此无需运行包管理器的安装。
248 0
|
8月前
|
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
3097 1
|
11月前
|
Python
解决"easy_install command not found"问题记录
解决"easy_install command not found"问题记录
435 0
|
11月前
|
Java Maven
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
Error running ‘ssm [clean]‘: No valid Maven installation found. Either set the home directory in the
|
11月前
|
Python
python离线安装环境 解决 ERROR: Could not find a version that satisfies the requirement xxx 以及winError[10061]
python离线安装环境 解决 ERROR: Could not find a version that satisfies the requirement xxx 以及winError[10061]
494 0
|
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文件(双击即可)错误是一样的解决方案。文件,打开后安装即可。
2354 1
报错解决:Could not build wheels for soxr, which is required to install pyproject.toml-based projects(可用)