ubuntu管理python版本

# 去conda官网下载安装miniconda
# 如:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
sh ./Miniconda3-latest-Linux-x86_64.sh
# 如果显示conda不存在,可能是环境变量没有激活
source ~/.bashrc
# conda安装镜像加速
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
# 创建conda环境
conda create -n python_3.8 python=3.8
# 使用conda环境
conda activate python_3.8
posted @ 2022-08-04 13:58  竹林取剑  阅读(37)  评论(0编辑  收藏  举报