Path to libgdal and libgeos files change


david@...
 

Since upgrading from rasterio 1.1.8 to 1.2.10, our linux process is failing because the paths to libgdal and libgeos are wrong. We need these paths to set GEOS_LIBRARY_PATH and GDAL_LIBRARY_PATH variables, which is required for our Django setup according to https://docs.djangoproject.com/en/1.10/ref/contrib/gis/install/geolibs/#geoslibrarypath. The paths we were using are rasterio.libs/libgdal*.so* and rasterio.libs/libgeos_c*.so*. It seems like these paths have changed, but I haven't found any documentation to point to where they are now located. Thanks for your help!


Sean Gillies
 

Hi,

Is it possible that you downloaded a source distribution for 1.2.10? Are there any .so files in it at all?

I don't recommend making your application depend on the wheel library locations. These are chosen by auditwheel and could change in the future. We don't guarantee them in any way.

On Fri, Feb 4, 2022 at 2:07 PM <david@...> wrote:
Since upgrading from rasterio 1.1.8 to 1.2.10, our linux process is failing because the paths to libgdal and libgeos are wrong. We need these paths to set GEOS_LIBRARY_PATH and GDAL_LIBRARY_PATH variables, which is required for our Django setup according to https://docs.djangoproject.com/en/1.10/ref/contrib/gis/install/geolibs/#geoslibrarypath. The paths we were using are rasterio.libs/libgdal*.so* and rasterio.libs/libgeos_c*.so*. It seems like these paths have changed, but I haven't found any documentation to point to where they are now located. Thanks for your help!



--
Sean Gillies


david@...
 
Edited

No, it's downloaded via pip. The errors are happening in AWS Lambda and I can't see the file structure.

I hear you about not guaranteeing library locations. Based on that Django documentation though it doesn't seem like there's another option unfortunately.


david@...
 

I figured out the issue and it is unrelated to Rasterio. Sorry to take your time!

Zappa was caching an invalid version of Rasterio and never releasing it to Lambda. Anyone finding this in the future, I documented the fix here https://github.com/zappa/Zappa/issues/1009