Curious S.T.E.M Loving Fellow

Conda, to the point

March 06, 2020

Installation (via Anaconda)

Environment

Create an environment containing a collection of conda packages.

conda create --name <environment name> <packages e.g. python=3.5>

Create from an environment.yml file with the command.

conda env create -f environment.yml

Workflow

List available environments.

conda info --envs

Activate an environment.

conda activate <environment name>

Note: Active environments are marked with an asterisk (*) in the terminal.

Optionally stack active environments.

conda activate --stack <environment name>

Deactivate the current environment.

conda deactivate

Packages

Search for a package to add.

conda search -f <package name>

Install a package in the current active environment.

conda install <package name>

Install a specific version of the package conda install pyspark=2.3.2=py37_0. Install the package in an environment different from the current active environment conda install --name <env name> <package name>.

Monitor with data or code

More Information

Conda is an open source general purpose package manager. It is used widely throught the python community by scientists and developers. Conda is not limited to managing packages for Python. Conda can install and manage packages from repo.continuum.io. Maintained by the Anaconda team and the default channel.

Conda environments are directories containing a collection of installed conda packages. Described in the environment.yml file. One can change environments by activating or deactivating them. The base environment in the env folder is the default environment. Separate environments allow users to keep packages isolated from each other.

Stack the environments to leave the current environment’s PATH entries in place so that you can continue to access command-line programs from the first environment.

Packages are a compressed tarball or bzipped tar archive file conatining metadata under the info directory and system-level libraries. Such as; python modules, executable programs, and other components. Packages are downloaded from channels.

The main configuration file, .condarc, is a runtime configuration file. The file follows the YAML syntax and can be found at;

  • user home directory
  • root environment directory (overrides user home dir located file)

References


T.J. Kolleh
Engineer with interests in the development & delivery of A.I. enhanced products. This site is a collection of thoughts about technology, and a way to keep track of research.
Built by (⚡tkolleh) 2018 - 2020, ፯ Number 7 Consulting LLC
Creative Commons License