lisflood-code icon indicating copy to clipboard operation
lisflood-code copied to clipboard

How to install lisflood in conda environment

Open li6364 opened this issue 1 year ago • 7 comments

After I installed the conda environment, I installed lisflood using the conda virtual environment according to the installation steps in the guide, but it keeps showing the error: metadata-generation-failed. I have tried multiple methods. Including downloading the source code of lisflood to install it also shows the same error. Installing lisflood-utilities first also shows the error and I can't find a solution anymore. Can you please tell me if there is any solution?

Translated with www.DeepL.com/Translator (free version)

li6364 avatar Feb 06 '24 14:02 li6364

Dear @li6364 I just tried to install lisflood in a new conda environment following the installation steps in the guide and it is working. To help you on this issue can you please share further information? What is the operating system you are using? Can you please send a log of all the commands you are executing for the installation? Thank you Carlo

doc78 avatar Feb 06 '24 15:02 doc78

My OS is Win10, but I have tried on both Windows & linux. After running it will show: Collecting lisflood-model Using cached lisflood-model-4.3.1.tar.gz (168 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [20 lines of output] Traceback (most recent call last): File "C:\Users\jndx1\AppData\Local\Temp\pip-install-n_04f7l3\lisflood-model_9809468fa8074592b51ddd7913d6ef26\setup.py", line 124, in _get_gdal_version p = subprocess.Popen(['gdal-config', '--version'], stdout=subprocess.PIPE) File "C:\Users\jndx1.conda\envs\lisflood1\lib\subprocess.py", line 800, in init restore_signals, start_new_session) File "C:\Users\jndx1.conda\envs\lisflood1\lib\subprocess.py", line 1207, in _execute_child startupinfo) FileNotFoundError: [WinError 2] The system cannot find the specified file. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 36, in File "", line 34, in File "C:\Users\jndx1\AppData\Local\Temp\pip-install-n_04f7l3\lisflood-model_9809468fa8074592b51ddd7913d6ef26\setup.py", line 134, in gdal_version = _get_gdal_version() File "C:\Users\jndx1\AppData\Local\Temp\pip-install-n_04f7l3\lisflood-model_9809468fa8074592b51ddd7913d6ef26\setup.py", line 126, in _get_gdal_version raise SystemError('gdal-config not found.' SystemError: gdal-config not found.GDAL seems not installed. Please, install GDAL binaries and libraries for your system and then install the relative pip package. >>>>>>>>>>>>>>>> Building LISFLOOD version 4.3.1 <<<<<<<<<<<<<<<<<< [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.

li6364 avatar Feb 06 '24 15:02 li6364

Unfortunately we do not provide support for Windows OS. Can you please send the Linux version and related logs?

doc78 avatar Feb 06 '24 15:02 doc78

Does that mean that the conda environment doesn't work even if it's installed on windows, and needs to be within a virtual system such as linux to be able to install it?

li6364 avatar Feb 06 '24 16:02 li6364

The full installation should be done on a Linux operating system. Thus you need to create the conda env in a Linux OS.

doc78 avatar Feb 06 '24 16:02 doc78

ok,thanks

li6364 avatar Feb 06 '24 16:02 li6364

I try it again

li6364 avatar Feb 06 '24 16:02 li6364