有了高级的版本如何进行回退,以python 3.8回退到python 3.7 为例

遇到问题:

有了高级的版本如何进行回退:

conda install python==3.7
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): \ 已杀死


问题描述

在这里插入图片描述
由于有了python 3.8.5 的版本,显示已杀死


原因分析:

我们Ubuntu需要的环境是python3.7,但miniconda的python3.7发行版在Ubuntu20.04下有些兼容问题

解决方案

建议先下载这一版python3.8的miniconda,再下载版本python3.7,进行版本回退

在这里插入图片描述首先,下载python3.8的版本

wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.9.2-Linux-x86_64.sh
sudo sh Miniconda3-py38_4.9.2-Linux-x86_64.sh
Welcome to Miniconda3 py38_4.9.2

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>                                 #这里需要敲回车
===================================
End User License Agreement - Anaconda Individual Edition
===================================

Copyright 2015-2020, Anaconda, Inc.

All rights reserved under the 3-clause BSD License:

之后敲yes

Miniconda3 will now be installed into this location:
/home/username/miniconda3
回车默认

不建议通过conda init进行初始化,因为可能会导致conda与系统里的软件相冲突。
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> no

在这时候,使用conda list来测试是否配置成功。如果出现conda: command not found,则需要在home/username/.bashrc文件末尾添加

export PATH=$PATH:/home/username/miniconda3/bin

退回Python3.7
conda install python==3.7

但个人情况仍然显示
在这里插入图片描述
我之前使用以下命令加载了添加国内镜像,进入清华镜像源anaconda页面

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda 
conda config --set show_channel_urls true

使用conda config --remove-key channels命令换回默认源
继续下载conda install python==3.7
ok
在这里插入图片描述

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值