To create an environment:
```shell
conda create --name myenv
conda create -n myenv python=3.4
conda create -n myenv scipy
conda create -n myenv python=3.4 scipy=0.15.0 astroid babel
```
Create the environment from the environment.yml file:
```shell
conda env create -f environment.yml
```
Sharing an environment
```shell
conda env export > environment.yml
```
Updating an environment
```shell
conda env update --prefix ./env --file environment.yml --prune
```
Cloning an environment
```shell
conda create --name myclone --clone myenv
```
Building identical conda environments
```shell
conda list --explicit > spec-file.txt
### run on another machine
conda create --name myenv --file spec-file.txt
```
Other
```shell
conda info --envs
## deactivate env
conda deactivate
## remove
conda remove --name myenv --all
```
Saving environment variables
1. Locate the directory for the conda environment in your Anaconda Prompt by running in the command shell %CONDA_PREFIX%.
2. Enter that directory and create these subdirectories and files:
```shell
cd %CONDA_PREFIX%
mkdir .\etc\conda\activate.d
mkdir .\etc\conda\deactivate.d
type NUL > .\etc\conda\activate.d\env_vars.bat
type NUL > .\etc\conda\deactivate.d\env_vars.bat
```
3. Edit .\etc\conda\activate.d\env_vars.bat as follows:
```shell
set MY_KEY='secret-key-value'
set MY_FILE=C:\path\to\my\file
```
4. Edit .\etc\conda\deactivate.d\env_vars.bat as follows:
```shell
set MY_KEY=
set MY_FILE=
```
When you run conda activate analytics, the environment variables MY_KEY and MY_FILE are set to the values you wrote into the file. When you run conda deactivate, those variables are erased.