Skip to content

Instantly share code, notes, and snippets.

@duonghuuphuc
Last active October 17, 2022 14:56
Show Gist options
  • Save duonghuuphuc/93d3503f09c9a9d3a64d5befc37ed68a to your computer and use it in GitHub Desktop.
Save duonghuuphuc/93d3503f09c9a9d3a64d5befc37ed68a to your computer and use it in GitHub Desktop.
Some popular and basic conda commands

CONDA CHEAT SHEET

This GIST presents some basic commands to work with Anaconda Terminal.

Basic commands

  • conda info --- Verify whether conda is installed, if yes, print all information about the installed conda such as Python version, conda version, env location
  • conda update conda --- Update conda to the latest version
  • conda install PACKAGENAME --- Install a package which is made available on Anaconda repository
  • pip install PACKAGENAME --- Install a package directly from PyPI
  • conda update PACKAGENAME --- Update an installed package
  • conda remove --name PACKAGENAME1 [PACKAGENAME2] --- Remove one or more packages
  • conda clean --all --- Clean conda cache and unused packages
  • anaconda-navigator --- Open Anaconda Navigator from terminal

Working with environments

  • conda create --name mypy39 python=3.9 --- Create an environment named mypy39 based on Python 3.9
  • conda create --clone mypy39 --name mypy39-2 --- Clone an environment (mypy39) to a new one (mypy39-2)
  • conda env list --- Return a list of environments where the current active environment is marked with * (an asterisk symbol)
  • source activate mypy39 --- Activate an environment on macOS and Linux
  • activate mypy39 --- Activate an environment on Windows
  • conda deactivate --- Deactivate the current active environment
  • conda list --- List all packages installed in an active environment
  • conda remove -n ENVNAME --all --- Delete a Conda environment and all of its packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment