conda cheatsheet

the nju mirror setting in ~/.condarc

''' channels: - conda-forge - defaults show_channel_urls: true default_channels: - https://mirrors.nju.edu.cn/anaconda/pkgs/free/ - https://mirrors.nju.edu.cn/anaconda/pkgs/main - https://mirrors.nju.edu.cn/anaconda/pkgs/r - https://mirrors.nju.edu.cn/anaconda/pkgs/msys2 custom_channels: conda-forge: https://mirrors.nju.edu.cn/anaconda/cloud msys2: https://mirrors.nju.edu.cn/anaconda/cloud bioconda: https://mirrors.nju.edu.cn/anaconda/cloud menpo: https://mirrors.nju.edu.cn/anaconda/cloud pytorch: https://mirrors.nju.edu.cn/anaconda/cloud simpleitk: https://mirrors.nju.edu.cn/anaconda/cloud channel_priority: strict '''

Info

just paste these text in .condarc, and everything is ok~

some shortcut

conda env export > haoxing.yaml

conda env create -f haoxing.yaml

conda env remove --name $env_name ------> this will remove given $env_name env, remember the --name

conda update $pkg -------> update. always confuse with homebrew...