initze / thaw-slump-segmentation

MIT License
9 stars 3 forks source link

gdal install for v0.10 branch #103

Closed initze closed 2 months ago

initze commented 2 months ago

gdal needs to be installed for v0.10 branch

pure gdal pip install breaking

  FileNotFoundError: [Errno 2] No such file or directory: 'gdal-config'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "/tmp/pip-install-00calwbp/gdal_746a34329f7340e9b7b4d8b405e8576a/setup.py", line 181, in get_gdal_config
      return fetch_config(option, gdal_config=self.gdal_config)
    File "/tmp/pip-install-00calwbp/gdal_746a34329f7340e9b7b4d8b405e8576a/setup.py", line 83, in fetch_config
      raise gdal_config_error(e)
  gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'

  Could not find gdal-config. Make sure you have installed the GDAL native library and development headers.
  [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.

khdlr commented 2 months ago

Ran into the same issue yesterday, it seems for pip you need to install the exact same version of gdal as you have installed on the system itself, which is kind of impossible to specify for all machines in the requirements. I guess we could install gdal either via conda or linux packages?

khdlr commented 2 months ago

Also I never understand why rasterio will work so easily on pip but gdal won't, when rio is based on gdal... :sob:

initze commented 2 months ago

added info to readme to install gdal before with conda