About
A conda environment is a directory that contains a specific collection of conda packages that you have installed.
Articles Related
Management
File Structure
The following subdirectories comprise the default Anaconda environment:
/bin
/include
/lib
/share
List
- active environment is shown with *
conda env list
# conda environments:
#
base * C:\Anaconda2-Python2.7
Save
conda list --explicit > bio-env.txt
Remove
conda env remove --name bio-env
Create
Scratch
Create a new environment named envName, install Python 3.5
conda create --name envName python=3.5
Clone
conda create --clone envName --name envTargetName
Text file
- From a text file created with the save command
conda env create --file env-name.txt
Activate
See Python - virtualenv (Python Environment / venv)
- WINDOWS:
activate
- macOS, LINUX
source activate
Deactivate
See Python - virtualenv (Python Environment / venv)
- WINDOWS:
deactivate
- macOS, LINUX
source deactivate
Share
Share a copy of the environment.yaml file.
Prompt
When using activate, change the command prompt from PS1 to include the activated environment. The default is True.
changeps1: False
Revision
List changes
List the history of each change to the current environment
conda list --revisions
Restore
Restore environment to a previous revision
conda install --revision 2