Data Science

Conda cheatsheet

Sponsored
Sponsored
Sponsored
Sponsored

Conda

Managing Conda and Anaconda, Environments, Python, Configuration, Packages. Removing Packages or Environments

Managing Conda and Anaconda

conda infoVerify conda is installed, check version #
conda update condaUpdate conda package and environment manager
conda update anacondaUpdate the anaconda meta package

Managing Environments

conda info --envsconda info -eGet a list of all my environmentsActive environment shown with *
conda create --name snowflakes biopythonconda create -n snowflakes biopythonCreate an environment and install program(s)
conda activate snowflakesActivate the new environment to use it
conda deactivateDeactivate the environment
conda create -n bunnies python=3.4 astroidCreate a new environment, specify Python version
conda create -n flowers --clone snowflakesMake exact copy of an environment
conda remove -n flowers --allDelete an environment
conda env export > puppies.ymlSave current environment to a file
conda env create -f puppies.ymlLoad environment from a file

Managing Python

conda search --full-name pythonconda search -f pythonCheck versions of Python available to install
conda create -n snakes python=3.4Install different version of Python in new environment

Managing .condarc Configuration

conda config --getGet all keys and values from my .condarc file
conda config --get channelsGet value of the key channels from .condarc file
conda config --add channels pandasAdd a new value to channels so conda looks for packages in this location

Managing Packages, Including Python

conda listView list of packages and versions installed in active environment
conda search beautiful-soupSearch for a package to see if it is available to conda install
conda install -n bunnies beautiful-soupInstall a new packageNOTE: If you do not include the name of the environment, it will install in the current active environment.
conda update beautiful-soupUpdate a package in the current environment
conda search --override-channels -c pandas bottleneckSearch for a package in a specific location (the pandas channel on Anaconda.org)
conda install -c pandas bottleneckInstall a package from a specific channel
conda search --override-channels -c defaults beautiful-soupSearch for a package to see if it is available from the Anaconda repository
conda install iopro accelerateInstall commercial Continuum packages
conda skeleton pypi pyinstrumentconda build pyinstrumentBuild a package from a Python Package Index (PyPi) Package

Removing Packages or Environments

conda remove --name bunnies beautiful-soupRemove one package from any named environment
conda remove beautiful-soupRemove one package from the active environment
conda remove --name bunnies beautiful-soup astroidRemove multiple packages from any environment
conda remove --name snakes --allRemove an environment

Share
Published by
Serhii Kupriienko

Recent Posts

Як стати  Software Engineer: моя історія

Для кого ця стаття? Для таких як я сам, хто в часи пандемії та суттєвої…

3 роки ago

Useful Git commands

Git is a free and open source distributed version control system designed to handle everything from small…

4 роки ago

Useful ASCII tables

ASCII Tables ASCII abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication.…

4 роки ago

TOP-10 questions about Python

Читати далі TOP-10 questions about Python

4 роки ago

TOP-10 questions about Django

Читати далі TOP-10 questions about Django

4 роки ago

Find the sum of the digits in the number 100! (Python)

Python code to demonstrate a method to compute the factorial digists sum, i.e. 100 factorial (100!). This test exercise I've recieved when I was looking…

4 роки ago

This website uses cookies.