curl -LO https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
winget install -e --id Anaconda.Miniconda3
# Miniconda
$env:Path += ";$env:USERPROFILE\AppData\Local\miniconda3\condabin"
conda update conda
conda --version (check version)
conda config --set auto_activate_base false
conda config --show channels
conda config --show default_channels
conda config --append channels <channel_name>
conda activate (base environment)
conda activate <env_name>
conda deactivate
conda env list
conda info --env
conda create -n <env_name> (empty env)
conda create -n <env_name> <pkg_name> (env with one package, can add more)
conda create -n <env_name> python=<version> (env with a specific python version)
conda env create -f <path_to_yaml_file>
conda env remove -name <env_name>
conda remove -n <env_name> --all (removes all packages and their dependencies)
conda env update -f .\environment.yml
conda create -n <new_env_name> --clone <env_name>
conda env export > environment.yml
conda clean --yes --all
conda clean --yes --packages
conda env config vars list
conda env config vars set my_var=value
conda env config vars unset my_var -n test-env
conda install -n <env_name> pip
conda activate <env_name>
pip <pip_subcommand>
conda list (current env)
conda list -n <env_name> (from within a different env)
conda list -n <env_name> <pkg_name> (check for a pkg within an env)
conda install <pkg_name>
conda install -c <channel_name> <pkg_name>
conda update <pkg_name>
conda update -c <channel_name> <pkg_name>
conda update --all
conda remove <pkg_name>
conda env update --prune (update to match yaml env file)
conda init powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
NOTE: you can specify the environment you want to affect using the -n and -p flags. The -n flag allows you to name the environment and -p allows you to specify the path to the environment.
--yes, -y (don't ask for permission)
--display, -d (dry run; useful to try out potentially dangerous actions)
--all