shaharkadmiel/pySW4

New install with gdal-config not found

Closed this issue · 5 comments

I'm trying to install pySW4 on a new HPC system using pip. I can't use conda on this machine. I'm getting errors where pip can't find gdal-config.

I installed gdal-build-debug (0.1.0) OK
I tried to install pygdal and GDAL, but these also fail, needing the gdal-config

The last bit of output is:

    raise gdal_config_error(e)
__main__.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config': 'gdal-config'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-p75q863m/gdal/

I've run into problems with this on laptop running conda, but I've been able to work around with conda updates. Do you have any suggestions?

Hi Artie,

GDAL has always been problematic. The error you are seeing comes from GDAL, not from pySW4. It used to be that GDAL install via conda was problematic and pip actually solved it. I guess it is the other way around now.

What you could do in the meantime untill you get gdal properly installed (you should be able to do python -c 'import gdal; print(gdal.VersionInfo())' and see the gdal version, not an error) is install pySW4 without any dependencies and use it without the gdal functionality. This means that you will be able to read SW4 outputs and other things that don't require gdal.

To do this, type:

pip install --no-deps https://github.com/shaharkadmiel/pySW4/archive/master.zip

Once gdal is installed, pySW4 will simply use it when needed.

Sorry I couldn't be more of help...

I would say go for the latest stable version available which is 2.3.2. Have an admin install from source https://trac.osgeo.org/gdal/wiki/DownloadSource, or use the package manager of choice on the LLNL system.

Then you should be able to do the pip install gdal as you've tried before. Note BTW, that the current package available from pip is indeed 2.3.2:

$ pip search gdal
GDAL (2.3.2)                   - GDAL: Geospatial Data Abstraction Library
'''