当前位置: 代码迷 >> 综合 >> Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法
  详细解决方案

Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

热度:60   发布时间:2023-10-24 02:41:15.0

最近想系统的学习一下机器学习中的python相关库,就参考了GitHub上的notes-python项目,但其运行环境为python2,因此需要安装一个python2.7环境。但执行conda create -n py27 python=2.7,失败了。然后又重新写了一下源,最终不知道为啥就出现了下面这个报错:

问题

The environment is inconsistent, please check the package plan carefully The following packages are causing the inconsistency:

踩坑

我尝试过conda clean --all,然后conda update --all(都失败了)Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

然后装了一堆包,问题没有得到解决Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

解决方法

好的,言归正传。分享一下我的解决方法:在管理员模式下,打开conda prompt;运行conda install anaconda

conda install anaconda

Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

安装py2.7环境

conda create -n py27 python=2.7

Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

激动!装好了
Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

为py2.7环境配置kernel

conda activate py27
pip install ipykernel #在py27环境下运行
python -m ipykernel install --name py27  --display-name "python2.7"

Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法
验证一下:打开jupyter,成功!
Anaconda:The environment is inconsistent, please check the package plan carefully问题的解决办法

.condarc文件内容

channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudmsys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudbioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudmenpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudpytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloudsimpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
ssl_verify: true
  相关解决方案