python多版本管理 Miniconda安装 | 您所在的位置:网站首页 › miniconda安装python › python多版本管理 Miniconda安装 |
文章目录
前言二、使用步骤1.下载, 使用清华下载源,进入miniconda下载页面2.安装3.使用
前言
开发的程序多了 python的版本比较多 环境比较乱 安装环境miniconda。 # 一、Miniconda 是什么?Miniconda 是一个 Anaconda 的轻量级替代,默认只包含了 python 和 conda,但是可以通过 pip 和 conda 来安装所需要的包。 二、使用步骤 1.下载, 使用清华下载源,进入miniconda下载页面代码如下: https://mirrors.tuna.tsinghua.edu.cn/help/anaconda/ https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/ wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh 2.安装代码如下: bash Miniconda3-py37_4.8.3-Linux-x86_64.sh1.In order to continue the installation process, please review the license agreement. Please, press ENTER to continue **回车**2.Do you accept the license terms? [yes|no] 3.Miniconda3 will now be installed into this location: /home/aiuser/miniconda3 Press ENTER to confirm the location Press CTRL-C to abort the installation Or specify a different location below ![]() 4.Do you wish the installer to initialize Miniconda3 by running conda init? [yes|no] 配置清华镜像 vim ~/.condarc #复制以下内容 channels: - defaults show_channel_urls: true default_channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r - 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每次重新进入环境需要 source ~/miniconda3/bin/activate #创建环境 -n 环境名 指定python 版本 conda create -n test python=3.7 #查看当前所有环境 conda info -e #进入环境 conda activate test #退出当前环境 conda deactivate #删除环境 conda env remove -n test # 总结使用conda非常方便。 |
CopyRight 2018-2019 实验室设备网 版权所有 |