简介
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安装包下载
- 清华大学开源软件镜像站 :https://mirrors.tuna.tsinghua.edu.cn/
-
检索关键词anaconda
- 找到最新的Linux版本,复制地址
- 使用wget命令下载软件包
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-py38_4.8.2-Linux-x86_64.sh
- 下载完成后运行
bash Miniconda3-py38_4.8.2-Linux-x86_64.sh
- 安装完成后,会在XXX用户主目录下自动生成一个Miniconda3目录(/home/XXX/Miniconda3)
- 添加清华镜像chanel
Anaconda 镜像使用帮助:https://mirror.tuna.tsinghua.edu.cn/help/anaconda/
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
查看版本号,确认是否安装成功
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