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

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

相关文章
|
资源调度 JavaScript Windows
yarn install命令报错解决办法-warning package-lock.json found.
yarn install命令报错解决办法-warning package-lock.json found.
318 0
|
6月前
|
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
1865 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
430 0
Python常见问题 - pip报错 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
|
5月前
|
编译器
“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.”
问题提解决: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
|
资源调度
No change to package.json was detected. No package manager install will be executed.怎么解决
这个提示是由于没有对 package.json 文件进行更改所导致的,因此无需运行包管理器的安装。
413 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文件(双击即可)错误是一样的解决方案。文件,打开后安装即可。
2659 1
报错解决:Could not build wheels for soxr, which is required to install pyproject.toml-based projects(可用)
|
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
123 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报错信息
Conda 卸载包报错:PackagesNotFoundError: The following packages are missing from the target environment:
Conda 卸载包报错:PackagesNotFoundError: The following packages are missing from the target environment:
Conda 卸载包报错:PackagesNotFoundError: The following packages are missing from the target environment: