ToolStack
KO

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

01

Installation & Version

  • conda --version

    Check the conda version

  • conda update conda

    Update conda itself to the latest version

  • conda update anaconda

    Update the entire Anaconda package suite

  • conda info

    Display current conda environment and configuration info

02

Virtual Environment Management

  • conda create -n 환경명 python=3.11

    Create a new virtual environment with a specified Python version

  • conda create -n 환경명 python=3.11 numpy pandas

    Create an environment and install packages at the same time

  • conda activate 환경명

    Activate a virtual environment

  • conda deactivate

    Deactivate the current environment (returns to base)

  • conda env list

    List all virtual environments

  • conda env remove -n 환경명

    Remove a specified virtual environment

  • conda rename -n 이전이름 새이름

    Rename a virtual environment (conda 23.9+)

03

Package Installation & Removal

  • conda install 패키지명

    Install a package into the active environment

  • conda install 패키지명=1.2.3

    Install 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 --all

    Update all packages in the active environment

04

Package Listing & Search

  • conda list

    List 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

05

Environment Export & Restore

  • conda env export > environment.yml

    Export the current environment to a YAML file

  • conda env export --no-builds > environment.yml

    Export without build tags (improves cross-OS portability)

  • conda env create -f environment.yml

    Restore an environment from a YAML file

  • conda env update -f environment.yml --prune

    Update environment from a YAML file and remove unused packages

06

Channels & Configuration

  • conda config --add channels conda-forge

    Add conda-forge channel with higher priority

  • conda config --set channel_priority strict

    Set channel priority to strict (prevents conflicts)

  • conda config --show channels

    Show the currently configured channels

  • conda clean --all

    Remove 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.

Related Tools