Linux010 Miniconda安装及使用

97 篇文章 2 订阅
93 篇文章 101 订阅

Linux010 Miniconda安装及使用

caoqiansheng已关注

0.8112020.08.01 19:49:48字数 401阅读 321

简介

  • Conda 是一个开源的软件包管理系统和环境管理系统,可以在多个操作系统上(包括 Linux,Mac OSX 和 Windows)使用,Conda 允许用户可以从不同的 channels下载所需的软件包,用户也可以自己对 channels源进行配置。

  • Anaconda 是一个用于科学计算的 Python 发行版,支持 Linux, Mac, Windows, 包含了众多流行的科学计算、数据分析的 Python 包。Anaconda 安装包可以到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 下载。

  • Miniconda 是一个 Anaconda 的轻量级替代,默认只包含了 python 和 conda,但是可以通过 pip 和 conda 来安装所需要的包,Miniconda 安装包可以到 https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/ 下载。

  • Bioconda是专门用来提供生信软件的 channel,提供有超过7000个的生信软件

Miniconda安装包下载

image.png

  • 找到最新的Linux版本,复制地址
  • 使用wget命令下载软件包
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh

 或  

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
  • 下载完成后运行
bash Miniconda3-py38_4.8.2-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

软件安装完成后,需要刷新环境变量才能启动,我自己选择输入命令 source ~/.bashrc

#上面的base应该是MiniConda3的基础环境,说明该程序已经启动了

source ~/.bashrc

也可以重新打开一下

conda config --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
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/pkgs/free/
conda config --add channels bioconda
conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
  • 运行conda -V查看版本号,确认是否安装成功
  • 查看 添加的 源
  •  cat ~/.condarc

  • linux下vi文本编辑命令(例:~/.bashrc)
  • vi ~/.condarc

 

 

conda使用方法

usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and packages.

Options:

positional arguments:
  command
    clean        Remove unused packages and caches.
    config       Modify configuration values in .condarc. This is modeled
                 after the git config command. Writes to the user .condarc
                 file (/home/caoqiansheng/.condarc) by default.
    create       Create a new conda environment from a list of specified
                 packages.
    help         Displays a list of available conda commands and their help
                 strings.
    info         Display information about current conda install.
    init         Initialize conda for shell interaction. [Experimental]
    install      Installs a list of packages into a specified conda
                 environment.
    list         List linked packages in a conda environment.
    package      Low-level conda package utility. (EXPERIMENTAL)
    remove       Remove a list of packages from a specified conda environment.
    uninstall    Alias for conda remove.
    run          Run an executable in a conda environment. [Experimental]
    search       Search for packages and display associated information. The
                 input is a MatchSpec, a query language for conda packages.
                 See examples below.
    update       Updates conda packages to the latest compatible version.
    upgrade      Alias for conda update.

optional arguments:
  -h, --help     Show this help message and exit.
  -V, --version  Show the conda version number and exit.

conda commands available from other packages:
  env

安装conda后取消命令行前出现的base,取消每次启动自动激活conda的基础环境

  • 方法一:
# 退出base环境回到系统自动的环境
conda deactivate
  • 方法二
# 永久关闭默认启动base
conda config --set auto_activate_base false
# 激活base
conda activate base
# 恢复默认启动base
conda config --set auto_activate_base true

卸载conda

首先,在家目录~有一个miniconda3的文件夹,使用rm命令将它删除

rm -rf miniconda3

6人点赞

 

Linux笔记

 

 

 

 

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wangchuang2017

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值