How to import GDAL embedded in new Fiona wheels
(First message on groups.io here: I hope I'm following locale rules, if not, don't hesitate to correct me !)
Since october 2022, Fiona's wheels include GDAL (according to the releases documentations). Many packages refer to GDAL using this command, but it won't work:
from osgeo import gdalFor instance, I've just loaded an environment using poetry (and python 3.9.15 on Linux):
poetry new dummyCalling this script will throw an error:
import richdem as rdI also tried to load Fiona at first (it patches GDAL environment variables at launch, if I've understood it correctly), but it doesn't change anything.
If I now install gdal (same version as the one included in my 1.8.22 Fiona, ie. gdal 3.4.3), then I ran into a different exception; I suspect it may be linked to poetry and the steps to configure my virtual environment:
rd.LoadGDAL("a/real/tif_file.tif")So the question is:
how could I fix the `from osgeo import gdal` from third party packages calling for GDAL (if GDAL is embedded in Fiona)?