Reputation: 1780
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
Upvotes: 104
Views: 266554
Reputation: 3431
To sum up (as of conda 4.8.4) conda env create
and conda create
are two fundamentally different commands.
conda create --file
expects a requirements.txt
, not an environment.yml
, each line in the given file is treated as a package-referenceenvironment.yml
conda env create --file environment.yml
conda create
are not available with conda env create
, such as --strict-channel-priority
, which may result in some confusionconda env create
is only mentioned deep into the docs of conda (although I think it is the more common command to use)Upvotes: 43
Reputation: 41
Worked for me on anaconda
, mini conda
Replace the .yml file path
to location of environment.yml
file.
conda env create --prefix ./env -f ../
yml file path
/environment.yml
Upvotes: 4
Reputation: 1529
The above answers did not work for me with conda 4.7.12, but this (from the Anaconda documentation) did:
conda env create -f environment.yml
Upvotes: 97
Reputation: 85482
conda env create
allows an option --file
for an environment file:
conda env create --name envname --file=environments.yml
Upvotes: 162