An Introduction to Conda Cheat Sheet

Conda is a line package and environment manager. This cheat sheet teaches you everything about Conda A.S.A.P.

Updated: 07 Nov, 23 by Susith Nonis 7 Min

List of content you will read in this article:

Conda is an open-source package and environment management system that enables users to install, update, and manage packages and their dependencies. It’s mainly used for Python and R languages. Additionally, the Conda syntax would allow users to search for packages in the Anaconda repository and other channels.

Conda syntaxes are invaluable for creating reproducible workflows and ensuring the same code runs and produce the same results across different systems. Conda syntaxes allow users to specify the exact versions of Python and packages they want to use. And it simplifies the installation process regardless of the operating system and hardware.

Next, exploring the Conda cheat sheets is highly recommended, which provide an overview of the syntax and commands used by Conda. These can be extremely helpful when using Conda for data science projects, as they will allow you to quickly and easily find the command you need. With access to over 6,000 data science packages and its powerful command line interface, Conda is an invaluable resource for any data scientist or developer looking to manage their projects efficiently.

The commands below will help you master Conda in the shortest possible time. Keep reading to find out more.

Managing Conda and Anaconda 

conda _info

It helps to verify that conda is installed, and you can check the version #

conda _update _conda 

Updates conda package and environment managers to current versions

conda_install_package-name

Install any package included in Anaconda

conda _update _andaconda 

Helps to update the anaconda meta-packages (the entire library of packages are ready to install with the conda command)

Managing environments 

conda info -envs or conda- info e 

Gets a list of your entire environments; the active environment is shown with * 

conda _create -name -snow_flakes _biopython

or

conda_ create -n -snowflakes biopython 

Creates environments and installs program(s) TIP: To avoid relevant errors, you can install all programs in the environment (snow_flakes) at the same time. TIP: By default, environments install into the envs directory in the conda directory. And also, you can specify the di-erent path; you can see conda_ create -help for details. 

source activate snowflakes for Linux and macOS

activate snowflakes for Window

Activate the new environment to use it. TIP: Activates and prepends the path to the snowflakes environment.

Conda_ create- -n bunnies _python=3.4 astroid 

Creates new environments; you can specify the Python version.

conda _create --n flowers --clone _snowflakes

Makes an exact copy of the environment

Managing Python 

conda _search ---full-name -python or conda _search -f -python

Checks if versions of Python are available to install 

conda _create --n snakes- python=3.4 

Helps to Install di­erent versions of Python in the new environment 

source activates snakes for Linux and Mac 

activates snakes for Windows

helps to Switch to the new environment with a di­erent version of Python TIP: Activate prepends the path to the snakes environment.

Managing .condarc configuration

conda _config --get 

Gets the entire keys and values from my._condarc _file 

conda _config --get channels 

It helps to get the value of the key channels from .condarc _file 

conda_ config- -adds channel-- panda 

Adds a new value to channels that conda will look for the packages in the current location

Managing packages, including Python 

conda_ list 

It helps you View lists of packages and versions that have been installed in the active environment.

conda _search --beautiful-soup 

Searches for a package to find out if they’re available to conda install.

conda _install --n bunnies beautifulsoup 

helps to Install a new package NOTE: If you don’t tend to include the name of the new environment (-n bunnies), it installs in the active environment. 

TIP: To see if a list of all packages is available through conda for installation, you can visit http://docs.continuum.io/anaconda/pkg-docs.html.

conda_ update --beautifulsoup 

Helps update a package in the current environment

Conda_ search -override--channels --c pandas bottle_neck 

Searches for a package in a particular location (you can see the pandas channel on Anaconda.org)

conda install --c pandas bottle_neck 

Installs a package from a particular channel 

Another possible method is searching by package name to Anaconda.org in the browser. It shows the specific channel (owner) through which it’s available.

conda _search -override--channels -c defaults beautifulsoup 

It helps you search for a package to find out if they’re available from the Anaconda repository.

source activate bunnies for Linux and macOS

activate bunnies for Windows 

pip install see 

allows users to activate environments where they want to install a package and install it with pip (included with Anaconda and Miniconda) 

conda _install --iopro accelerate 

It helps you install commercial Continuum package.

Managing several versions of Python

conda_create_python34

It helps install various versions of Python in new environments

Windows: activate_python34

macOS, Linux: source_activate_python34

switches to the environment containing another version of Python

python-versionnumber

shows you the version of your Python

Removing packages or environments 

conda _remove --name bunnies -beautiful-soup 

Removes one package from any environment that you have named before

conda _remove -beautiful-soup 

It helps Remove one package from the active environment 

conda _remove --name bunnies _beautiful-soup astroid 

Removes several packages from any environment 

conda_remove -name snakes -all 

helps you Remove the environment

  • Conda is an open-source package and environment management system.
  • Conda creates reproducible workflows and codes.
  • Conda makes the installation process much easier, and it’s mostly used with Python or R.
  • Conda is an invaluable resource for developers because of its 6000 data science packages and powerful command line interface.

People also read: 

Susith Nonis

Susith Nonis

I'm fascinated by the IT world and how the 1's and 0's work. While I venture into the world of Technology, I try to share what I know in the simplest way with you. Not a fan of coffee, a travel addict, and a self-accredited 'master chef'.

user monovm

Adrian Kuvalis

2024, Jun, 24

This is a fantastic guide on how to effectively use Conda for managing packages and environments! Conda's ability to create reproducible workflows and handle dependencies across different systems is invaluable, especially for data scientists and developers working with Python and R. The cheat sheet and command breakdowns provided here are incredibly helpful. Definitely bookmarking this for future reference. Thank you for sharing!