Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating virtual environment using environment.yml in miniconda

I am trying to create virtual environment using environment.yml in miniconda (Where environment.yml contains a list of all dependecies.) using the following command:

conda env create -f environment.yml

but I get this error (this is entire output)

Error: prefix already exists: /home/danish/miniconda3/envs/venv

Can someone help me correcting the error?

Thanks in advance :)

like image 454
danish sodhi Avatar asked May 11 '16 13:05

danish sodhi


1 Answers

The environment.yml specifies that the name of the environment is venv at the top of your file -- i.e.

name: venv

But that environment already exists (you can see it via conda env list). The solution here is to change the name in the environment.yml or use a different name when you are creating the environment. Example:

conda env create -f environment.yml -n new-env-name

Where the new-env-name is an environment name you haven't used yet.

like image 111
Paul Avatar answered Nov 14 '22 22:11

Paul