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

最近想系统的学习一下机器学习中的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(都失败了)在这里插入图片描述

然后装了一堆包,问题没有得到解决

解决方法

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

conda install anaconda

在这里插入图片描述

安装py2.7环境

conda create -n py27 python=2.7

在这里插入图片描述

激动!装好了
在这里插入图片描述

为py2.7环境配置kernel

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

在这里插入图片描述
验证一下:打开jupyter,成功!
在这里插入图片描述

.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/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
ssl_verify: true

  • 15
    点赞
  • 38
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值