Conda Installation
- follow the instructions on the official website: link
Conda Environment Management
- create a new environment named
conda_name
conda create --name conda_name
- activate the environment
conda activate conda_name
- to see list of alll your environments
conda info --envs
orconda env list
- create the environment from environment.yaml file
conda env create -f environment.yml
- clone an environment
conda create --name myclone --clone mysource
- update environment
conda env update --file local.yml
Conda Package Management
- find a package
conda search package_name
- install package
conda install package_name
orconda install -n envname package_name=0.15.0
orconda install --prefix=~/env pytorch
- to see the packages installed in the environment
conda list
Export Conda Environment to yaml file
conda env export > environment.yml
Remove Conda Environment
conda remove --name myenv --all
Conda Add Channels
conda config --show channels
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
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/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes