Conda Commands Cheatsheet
Conda virtual environment creation, package management, and environment.yml
Your data never leaves the browser — all processing is done locally 0 server requests
Installation & Version
-
conda --versionCheck the conda version
-
conda update condaUpdate conda itself to the latest version
-
conda update anacondaUpdate the entire Anaconda package suite
-
conda infoDisplay current conda environment and configuration info
Virtual Environment Management
-
conda create -n 환경명 python=3.11Create a new virtual environment with a specified Python version
-
conda create -n 환경명 python=3.11 numpy pandasCreate an environment and install packages at the same time
-
conda activate 환경명Activate a virtual environment
-
conda deactivateDeactivate the current environment (returns to base)
-
conda env listList all virtual environments
-
conda env remove -n 환경명Remove a specified virtual environment
-
conda rename -n 이전이름 새이름Rename a virtual environment (conda 23.9+)
Package Installation & Removal
-
conda install 패키지명Install a package into the active environment
-
conda install 패키지명=1.2.3Install a specific version of a package
-
conda install -n 환경명 패키지명Install a package into a different environment
-
conda install -c conda-forge 패키지명Install a package from the conda-forge channel
-
conda uninstall 패키지명Remove a package
-
conda update 패키지명Update a package to the latest version
-
conda update --allUpdate all packages in the active environment
Package Listing & Search
-
conda listList all installed packages in the active environment
-
conda list -n 환경명List packages in a specified environment
-
conda search 패키지명Search for available packages and their versions
-
conda search -c conda-forge 패키지명Search for a package in the conda-forge channel
Environment Export & Restore
-
conda env export > environment.ymlExport the current environment to a YAML file
-
conda env export --no-builds > environment.ymlExport without build tags (improves cross-OS portability)
-
conda env create -f environment.ymlRestore an environment from a YAML file
-
conda env update -f environment.yml --pruneUpdate environment from a YAML file and remove unused packages
Channels & Configuration
-
conda config --add channels conda-forgeAdd conda-forge channel with higher priority
-
conda config --set channel_priority strictSet channel priority to strict (prevents conflicts)
-
conda config --show channelsShow the currently configured channels
-
conda clean --allRemove all caches, packages, and index files (frees disk space)
Conda: Isolated Environments for Every Project
conda manages Python versions and packages in isolated virtual environments. Create environments with conda create, activate with conda activate, and install packages with conda install. This keeps projects independent and prevents dependency conflicts — especially useful for machine learning and data science stacks.
The conda-forge channel offers more packages than the default channel and updates faster. Add it with conda config --add channels conda-forge and set channel_priority strict to avoid conflicts.
Share environments with teammates using environment.yml. Export with --no-builds for cross-OS compatibility, and restore with conda env create -f environment.yml.
FAQ
- Can I use conda and pip together?
- Yes, but with caution. Inside a conda environment, prefer conda install when the package is available. Only use pip as a fallback. Running conda update --all after pip installs can cause conflicts — avoid mixing them unless necessary.
- What is the difference between Miniconda and Anaconda?
- Miniconda is a minimal installer containing only conda and Python — install only what you need. Anaconda includes 250+ pre-installed data science packages. Start with Miniconda for a leaner setup; use Anaconda if you want everything pre-configured.
- environment.yml causes errors on a different OS. How do I fix it?
- conda env export includes build strings that are OS-specific. Use conda env export --no-builds to omit build tags and create a more portable file that works across operating systems.