Conda - Environment

1 - About

A conda environment is a directory that contains a specific collection of conda packages that you have installed.

3 - Management

3.1 - File Structure

The following subdirectories comprise the default Anaconda environment:


/bin
/include
/lib
/share

3.2 - List


conda env list


# conda environments:
#
base                  *  C:\Anaconda2-Python2.7

3.3 - Save


conda list --explicit > bio-env.txt

3.4 - Remove


conda env remove --name bio-env

3.5 - Create

3.5.1 - Scratch

Create a new environment named envName, install Python 3.5


conda create --name envName python=3.5

3.5.2 - Clone


conda create --clone envName --name envTargetName

3.5.3 - Text file

  • From a text file created with the save command

conda env create --file env-name.txt

3.6 - Activate

See Python - virtualenv (Python Environment)

  • WINDOWS:

activate

  • macOS, LINUX

source activate

3.7 - Deactivate

See Python - virtualenv (Python Environment)

  • WINDOWS:

deactivate

  • macOS, LINUX

source deactivate

3.8 - Share

Share a copy of the environment.yaml file.

3.9 - Prompt

Doc

When using activate, change the command prompt from $PS1 to include the activated environment. The default is True.


changeps1: False

3.10 - Revision

3.10.1 - List changes

List the history of each change to the current environment


conda list --revisions

3.10.2 - Restore

Restore environment to a previous revision


conda install --revision 2

4 - Documentation / Reference


Data Science
Data Analysis
Statistics
Data Science
Linear Algebra Mathematics
Trigonometry

Powered by ComboStrap