Skip to content

Instantly share code, notes, and snippets.

@jSayal
Created July 20, 2025 13:31
Show Gist options
  • Select an option

  • Save jSayal/4b0aec32974a623c6589fb24fdc23b73 to your computer and use it in GitHub Desktop.

Select an option

Save jSayal/4b0aec32974a623c6589fb24fdc23b73 to your computer and use it in GitHub Desktop.
Conda Cheatsheet

Conda Cheatsheet


πŸ”§ Basic Conda Commands

conda --version         # Show conda version
conda info              # Show system info
conda update conda      # Update conda itself
conda help              # Display help for conda

πŸ“ Environment Management

Task Command
Create environment conda create -n myenv python=3.11
Activate environment conda activate myenv
Deactivate environment conda deactivate
Remove environment conda remove -n myenv --all
List all environments conda env list or conda info --envs
Clone environment conda create --name newenv --clone oldenv
Export environment conda env export > environment.yml
Create from YAML conda env create -f environment.yml

πŸ“¦ Package Management

Task Command
Search for a package conda search numpy
Install a package conda install numpy
Install from specific channel conda install -c conda-forge pandas
Remove a package conda remove numpy
Update a package conda update numpy
List installed packages conda list

🌐 Channels

conda config --show channels               # List current channels
conda config --add channels conda-forge    # Add conda-forge channel
conda config --set channel_priority strict # Enforce strict channel priority

βš™οΈ Conda Configuration

conda config --show              # Show all config
conda config --edit              # Edit config in default editor
conda config --set auto_activate_base false   # Disable auto-activation of base

🧹 Cleanup

conda clean --all                # Remove caches, unused packages, etc.
conda clean --packages           # Remove unused cached packages only
conda clean --tarballs           # Remove cached tarballs

πŸ“„ Conda YAML Example

name: myenv
channels:
  - conda-forge
dependencies:
  - python=3.11
  - numpy
  - pandas
  - pip
  - pip:
      - requests

Use with:

conda env create -f environment.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment