Open-ET / flux-data-qaqc

Energy Balance Closure Analysis and Eddy Flux Data Post-Processing
BSD 3-Clause "New" or "Revised" License
25 stars 13 forks source link

installation instructions give error #2

Closed dgketchum closed 3 years ago

dgketchum commented 4 years ago

Using an existing conda env: git clone https://github.com/Open-ET/flux-data-qaqc.git cd flux-data-qaqc/ then conda install --file environment.yml gives CondaValueError: could not parse 'name: fluxdataqaqc' in: environment.yml And from conda base: conda env create -f environment.yml gives CondaValueError: 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:

Package                Version            
---------------------- -------------------
certifi                2020.4.5.1         
cffi                   1.14.0             
chardet                3.0.4              
conda                  4.8.3              
conda-package-handling 1.7.0              
cryptography           2.9.2              
idna                   2.9                
pip                    20.0.2             
pycosat                0.6.3              
pycparser              2.20               
pyOpenSSL              19.1.0             
PySocks                1.7.1              
requests               2.23.0             
ruamel-yaml            0.15.87            
setuptools             46.4.0.post20200518
six                    1.14.0             
tqdm                   4.46.0             
urllib3                1.25.8             
wheel                  0.34.2  
JohnVolk commented 4 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

JohnVolk commented 3 years ago

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.