Conda is a cross-platform package, dependency, and environment manager for Python, R, and other languages.
docs: https://www.anaconda.com/docs/main
other:
Setup
- Install Conda.
# windows
winget install --exact --id Anaconda.Miniconda3
& "$env:USERPROFILE\miniconda3\Scripts\conda.exe" init powershell
# linux
sudo pacman -S miniconda3
# mac
brew install miniconda3
- Update Conda and set basic configuration.
conda update conda
conda config --add channels conda-forge
conda config --set channel_priority strict
conda config --set auto_activate_base false
Usage
Environment
conda create --name <env-name> python=<py-ver> # create environment, =<py-ver> is optional
conda env export --name <env-name> > <path/env-name.yml> # save environment to .yml
conda env create --file <path/env-name.yml> # create environment from .yml
conda activate <env-name>
conda deactivate
conda remove --name <env-name> --all # delete environment
Package
conda install <pkg>=<pkg-ver> # =<pkg-ver> is optional
conda uninstall <pkg> --name <env-name> # remove package from enviornment
conda update --all --name <env-name> # update all packages in environment
Usefull Packages
juypter
conda install jupyterlab
jupyter lab
machine learning
pytorch