遇到问题:
有了高级的版本如何进行回退:
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