Reputation: 63
I'm trying to install new environment from yml file. I did it using miniconda3. However I got this kind of error:
(base) C:\Users\pool prog\Miniconda3>conda env create -f environment.yml
usage: conda-env-script.py [-h] {create,export,list,remove,update,config} ...
conda-env-script.py: error: unrecognized arguments: environment.yml
I dont understand whats happening. The .yml file is already on the directory. Anyone know how to fix this?
Upvotes: 3
Views: 6805
Reputation: 111
You are in your "base" environment from Anaconda/miniconda. In order to create and activate your new environment, you have to deactivate your base environment. When you do, you should no longer have the (base) designation at the beginning of each command line prompt. Now you can create your environment and activate it.
The following commands, executed in the directory containing environment.yml, should get you there:
conda deactivate
conda env create -f environment.yml
conda activate <env_name>
As a helpful side note, to see what environments you have already created and are available to you, run conda info --envs
. You will be shown a list of your environments, and the one with an "*" in front of its name is the active one.
This link may be useful if working with conda is unfamiliar territory: https://conda.io/projects/conda/en/latest/user-guide/getting-started.html
Upvotes: 1