Warm tip: This article is reproduced from stackoverflow.com, please click
Anaconda conda

CondaValueError: The target prefix is the base prefix. Aborting

发布于 2020-03-27 10:20:36

I have the following conda environment file environment.yml:

name: testproject
channels:
- defaults
dependencies:
- python=3.7
prefix: /opt/projects/testproject

Before creating the environment, only the base environment exists:

(base) me@mymachine:/opt/projects/testproject$ conda env list
# conda environments:
#
base                  *  /opt/anaconda/anaconda3

When trying to create the environment, I get the following error:

(base) me@mymachine:/opt/projects/testproject$ conda create -f environment.yml

CondaValueError: The target prefix is the base prefix. Aborting.

What does this error mean?

Questioner
matthiash
Viewed
2.3k
787 2019-08-21 13:29

You need to use

conda env create -f environment.yml

Notice the extra env after conda and before create.

For more information check the documentation.