How to make new anaconda env from yml file

enter image description here

I installed anaconda in C:\Program Files\Anaconda3. Every time to create a new env, I just do cmd and write:

conda create --name envname python=3.5

But how can i install a new env from the "environments.yml" file

enter image description here


Solution 1:

conda env create allows an option --file for an environment file:

conda env create --name envname --file=environments.yml

Solution 2:

conda env create --file environment.yml