-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rasterio can't find libgdal.so.36 when gdal, libgdal, and rasterio installed via conda-forge channel #324
Comments
Hmm, I'm getting a compile error when running
I'll try and see if I can fix the compile errors (looks like I'm using an incompatible version of rustc, see geoarrow/geoarrow-rs#716), so that I can reproduce this properly. But just to answer quickly, it might be best to package stac-rs on conda-forge to handle GDAL incompatibility issues (edit: see conda-forge/staged-recipes#28293) |
Managed to compile after downgrading my rustc version from 1.82 to 1.80 using conda install -c conda-forge rioxarray libgdal-arrow-parquet and then I got this error: Traceback (most recent call last):
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/xarray/backends/file_manager.py", line 211, in _acquire_with_cache_info
file = self._cache[self._key]
~~~~~~~~~~~^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/xarray/backends/lru_cache.py", line 56, in __getitem__
value = self._cache[key]
~~~~~~~~~~~^^^^^
KeyError: [<function open at 0x7f0f9ac28b80>, ('GTI:/home/user/items.parquet',), 'r', (('sharing', False),), 'ae2c44bb-1e02-4c90-a3e0-aacef4e57f5a']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "rasterio/_base.pyx", line 310, in rasterio._base.DatasetBase.__init__
File "rasterio/_base.pyx", line 221, in rasterio._base.open_dataset
File "rasterio/_err.pyx", line 359, in rasterio._err.exc_wrap_pointer
rasterio._err.CPLE_AppDefinedError: Cannot find field location
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/xarray/backends/api.py", line 671, in open_dataset
backend_ds = backend.open_dataset(
^^^^^^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/rioxarray/xarray_plugin.py", line 58, in open_dataset
rds = _io.open_rasterio(
^^^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/rioxarray/_io.py", line 1128, in open_rasterio
riods = manager.acquire()
^^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/xarray/backends/file_manager.py", line 193, in acquire
file, _ = self._acquire_with_cache_info(needs_lock)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/xarray/backends/file_manager.py", line 217, in _acquire_with_cache_info
file = self._opener(*self._args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/rasterio/env.py", line 463, in wrapper
return f(*args, **kwds)
^^^^^^^^^^^^^^^^
File "/home/user/mambaforge/envs/test/lib/python3.11/site-packages/rasterio/__init__.py", line 355, in open
dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "rasterio/_base.pyx", line 312, in rasterio._base.DatasetBase.__init__
rasterio.errors.RasterioIOError: Cannot find field location Was this the error you were getting? Doesn't seem related to not finding libgdal. |
WOOPS sorry for the bad mre. Missed those dependencies. I get the same error and I don't think this is a rasterio/gdal packaging issue. I think it's probably some incompatibility between the geoparquet produced by The issue with libgdal not being found seems specific to my use of pixi to set up the conda environment. I think some environment variables are not being correctly set up to discover the correct GDAL potentially. in any case doesn't seem like an issue with packaging so closing |
Solution to issue cannot be found in the documentation.
Issue
I'm trying to use this environment to read a stac-geoparquet with the new GTI driver that comes with gdal 3.10
then pip install
pip install stacrs
I can use the GTI driver with a FlatGeoBuf
but not stac-geoparquet. idk why, but rasterio looks for the wrong libgdal.so.35, I have libgdal.so.36
Installed packages
Environment info
The text was updated successfully, but these errors were encountered: