conda create environment from yml with name code example
Example 1: conda create env from yml
conda env create -f environment.yml
Example 2: how to create anaconda environment.yml file
conda env export > environment.yml
conda env create -f environment.yml
conda env export > environment.yml