Anaconda

less than 1 minute read

1 Installation

You can visit Tsinghua Open Source Mirror to get the version of anaconda you need.

# Download anaconda to some directory
wget --directory-prefix=$DOWNLOAD_DIR_PREFIX https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.11-Linux-x86_64.sh
# Execute the installing script of anaconda under batch mode(-b), non-interactive.
bash $DOWNLOAD_DIR_PREFIX/Anaconda3-2020.11-Linux-x86_64.sh -b
Configure Resource of Anaconda
# Clean cache of channel index
conda clean -i
# Add channel of Tsinghua Open Source to $HOME/.condarc
echo "
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/free
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
  - 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
" > $HOME/.condarc

2 Commands

2.1 Search whether a package has installed.

conda list | grep package

2.2 Remove the environment name prefix in the terminal prompt.

conda config --set changeps1 false

Updated: