I'm submitting a...
I have been given an environment.yml file that I want to use. I install anaconda2 using:
bash ~/Downloads/Anaconda2-5.1.0-Linux-x86_64.sh
Now, following the documentation, I want to create my environment, so I run:
conda env create -f environment.yml
which throws the following error:
CondaValueError: prefix already exists: /home/user/anaconda2
How is it an error that anaconda is already installed? Any help here would be greatly appreciated.
Thanks
bash ~/Downloads/Anaconda2-5.1.0-Linux-x86_64.sh`
conda env create -f environment.yml
I think this should create the environment specified by the environment.yml file.
active environment : Noneconda info
user config file : /home/user/.condarc
populated config files :
conda version : 4.4.11
conda-build version : 3.4.1
python version : 2.7.14.final.0
base environment : /home/user/anaconda2 (writable)
channel URLs : https://repo.continuum.io/pkgs/main/linux-64
https://repo.continuum.io/pkgs/main/noarch
https://repo.continuum.io/pkgs/free/linux-64
https://repo.continuum.io/pkgs/free/noarch
https://repo.continuum.io/pkgs/r/linux-64
https://repo.continuum.io/pkgs/r/noarch
https://repo.continuum.io/pkgs/pro/linux-64
https://repo.continuum.io/pkgs/pro/noarch
package cache : /home/user/anaconda2/pkgs
/home/user/.conda/pkgs
envs directories : /home/user/anaconda2/envs
/home/user/.conda/envs
platform : linux-64
user-agent : conda/4.4.11 requests/2.18.4 CPython/2.7.14 Linux/3.16.0-4-amd64 debian/8 glibc/2.19
UID:GID : 1005:1005
netrc file : None
offline mode : False
I realized I'm installing the environment in the wrong place. Still seems like this is a bug, but not one that affects me.
Got the same error in my anaconda3 installation. I realized my .yml
file did have an empty name field. As said in the docs this is needed to execute this command.
For future reference you could do conda env create -f environment.yml -n environmentName
. Or simply write the name in the yml file. Maybe a more clear error message will be helpful although I am not sure how common it is to forget naming the environment when creating a .yml
file.
conda version : 4.6.3
conda-build version : 3.0.27
python version : 3.6.6.final.0
base environment : /home/user/anaconda3 (writable)
Please open your environment.yml
file and check the name of the environment, it should be the first line in your file (!). Make sure the name doesn't say
name: base
or has a similar name to existing environment you previously created which you can check by running the command conda info --envs
Change that 'name' to your new environment
name: your-new-env-name
Most helpful comment
Got the same error in my anaconda3 installation. I realized my
.yml
file did have an empty name field. As said in the docs this is needed to execute this command.For future reference you could do
conda env create -f environment.yml -n environmentName
. Or simply write the name in the yml file. Maybe a more clear error message will be helpful although I am not sure how common it is to forget naming the environment when creating a.yml
file.