Conda Cheat Sheet
Searchable reference for 90+ conda commands — environments, packages, channels, export, mamba, Jupyter kernels, and advanced tips with one-click copy
conda --versionCheck conda version
conda update condaUpdate conda to latest version
conda update anacondaUpdate all packages in Anaconda distribution
conda config --showShow all conda configuration
conda config --set auto_activate_base falseDisable auto-activation of base environment
conda config --add channels conda-forgeAdd conda-forge channel
conda config --show channelsShow configured channels
conda config --set channel_priority strictSet strict channel priority
conda init bashInitialize conda for bash shell
conda init powershellInitialize conda for PowerShell
conda create -n myenvCreate a new empty environment
conda create -n myenv python=3.11Create environment with specific Python version
conda create -n myenv python=3.11 numpy pandasCreate environment with multiple packages
conda create --clone myenv -n myenv_copyClone an existing environment
conda activate myenvActivate an environment
conda deactivateDeactivate current environment
conda env listList all environments
conda info --envsList all environments (alternative)
conda remove -n myenv --allDelete an environment completely
conda rename -n old_name new_nameRename an environment (conda ≥23.9)
conda create -p /path/to/env python=3.11Create environment at a specific path
conda install numpyInstall a package in active environment
conda install numpy=1.24.0Install a specific version
conda install -n myenv numpyInstall package into a specific environment
conda install -c conda-forge packageInstall from conda-forge channel
conda install --file requirements.txtInstall packages from a requirements file
pip install packageInstall a pip package inside conda env
Use when package is not on conda
conda install anaconda::numpyInstall from a specific channel (new syntax)
conda listList all packages in active environment
conda list -n myenvList packages in a specific environment
conda list --export > packages.txtExport package list to a file
conda update numpyUpdate a specific package
conda update --allUpdate all packages in the environment
conda remove numpyRemove a package
conda remove -n myenv numpyRemove a package from a specific environment
conda search numpySearch for a package
conda search -c conda-forge numpySearch in conda-forge channel
conda search numpy --infoShow detailed info about a package
conda env export > environment.ymlExport environment to YAML (exact)
conda env export --from-history > env.ymlExport only explicitly installed packages
conda env create -f environment.ymlCreate environment from YAML file
conda env update -f environment.yml --pruneUpdate environment from YAML and remove extras
conda list --export > spec-file.txtExport spec list (conda only)
conda create -n newenv --file spec-file.txtCreate environment from spec file
conda pack -n myenv -o myenv.tar.gzPack environment for offline transfer
Requires conda-pack
conda config --add channels conda-forgeAdd conda-forge as a channel
conda config --remove channels defaultsRemove a channel
conda config --show channelsShow current channel list
conda config --set channel_priority strictSet strict channel priority
conda config --set channel_priority flexibleSet flexible channel priority
conda install -c pytorch pytorchInstall from PyTorch channel
conda install -c nvidia cuda-toolkitInstall from NVIDIA channel
conda infoShow conda system information
conda info --envsShow environment locations
conda info numpyShow info about an installed package
conda doctorCheck for environment issues (conda ≥23.3)
conda list --revisionsShow history of changes in environment
conda install --revision 2Roll back to a specific revision
conda config --describeDescribe all available config options
conda clean --allRemove all cached packages and tarballs
conda clean --packagesRemove unused cached packages
conda clean --tarballsRemove cached package tarballs
conda clean --index-cacheRemove cached channel index
conda clean --locksRemove lock files
conda remove -n myenv --allCompletely remove an environment
conda install pipEnsure pip is installed in conda env
pip install packageInstall a pip-only package
pip listList pip-installed packages
pip freeze > requirements.txtExport pip packages to requirements.txt
pip install -r requirements.txtInstall from pip requirements file
conda list | grep pypiShow packages installed via pip
pypi channel indicates pip-installed
conda install -c conda-forge mambaInstall mamba (faster conda)
mamba create -n myenv python=3.11Create environment with mamba
mamba install numpy pandasInstall packages with mamba (faster)
mamba update --allUpdate all packages with mamba
mamba env export > environment.ymlExport environment with mamba
mamba clean --allClean cache with mamba
conda install jupyterlabInstall JupyterLab
conda install ipykernelInstall IPython kernel
python -m ipykernel install --user --name myenvRegister conda env as Jupyter kernel
jupyter kernelspec listList all Jupyter kernels
jupyter kernelspec uninstall myenvRemove a Jupyter kernel
jupyter labLaunch JupyterLab
conda create -n myenv --offlineCreate environment using only cached packages
conda install --freeze-installed numpyInstall without changing existing packages
conda config --env --add channels conda-forgeAdd channel for current env only
CONDA_SUBDIR=osx-arm64 conda create -n arm_envCreate environment for a specific platform
conda run -n myenv python script.pyRun a command in an env without activating
conda compare environment.ymlCompare env with a YAML file (conda ≥23.1)
conda env config vars set MY_VAR=valueSet environment variable in conda env
conda env config vars listList env variables set in conda env
conda build recipe/Build a conda package from a recipe
Requires conda-build
conda convert --platform all pkg.tar.bz2Convert package to all platforms
Requires conda-build
93 conda commands · hover any command to copy
Tiếp tục khám phá
Công cụ Công cụ Developer khác bạn có thể thích…
Định dạng JSON
Định dạng, kiểm tra và nén JSON với tô sáng cú pháp và phát hiện lỗi
Mã hóa/Giải mã Base64
Mã hóa văn bản hoặc file sang Base64 và giải mã chuỗi Base64 thành văn bản
Mã hóa/Giải mã URL
Mã hóa và giải mã thành phần URL và tham số query string
Tạo UUID
Tạo UUID ngẫu nhiên (v1, v4) hoặc tạo hàng loạt nhiều UUID cùng lúc
Tạo Hash
Tạo hash MD5, SHA-1, SHA-256, SHA-512 từ văn bản hoặc file
Kiểm tra Regex
Kiểm tra biểu thức chính quy với tô sáng khớp thời gian thực và trích xuất nhóm
Giải mã JWT
Giải mã và kiểm tra JSON Web Token — xem header, payload và xác minh chữ ký
Định dạng HTML
Định dạng và làm đẹp mã HTML với thụt lề đúng và tô sáng cú pháp