Closed dgketchum closed 3 years ago
Be sure you wrote the command exactly as:
conda env create -f environment.yml
If you for example run
conda create -f environment.yml
You will get the error you saw which is confusing.
From looking into it the prefix has to do with the path you want the environment saved to. If the command above is still not working try giving a prefix to a path you want to install the environment to although it is not clear to me why this would be needed. For example you could specify an "env" sub folder.
conda env create --file environment.yml --prefix ./env
A requirements.txt file was made around the time of this issue, closing now. I try to avoid requirements.txt in favor of looser version specifications to avoid cross-platform compatibility issues plus Conda seems to handle package versions and compatibility issues well for me. When I made the requirements.txt file for flux-data-qaqc
it was from my Linux (Ubuntu) machine with packages initially installed through Conda.
Using an existing conda env:
git clone https://github.com/Open-ET/flux-data-qaqc.git
cd flux-data-qaqc/
thenconda install --file environment.yml
givesCondaValueError: could not parse 'name: fluxdataqaqc' in: environment.yml
And from conda base:conda env create -f environment.yml
givesCondaValueError: The target prefix is the base prefix. Aborting.
I might also suggest creating a requirements.txt with
pip freeze
that spells out the package dependencies, as the .yml does not get that specific.This is using miniconda3 base, with
pip list
: