Re: How to import GDAL embedded in new Fiona wheels


Fiona's wheels contain a GDAL shared library (libgdal.dll or .so or .dylib) and its own library dependencies (libproj, etc). By GDAL, we mean the C library. I don't think this is inaccurate. I don't see that it's completely natural to assume that fiona imports osgeo.gdal. There are no such imports anywhere in the code and no instructions in the project to install the osgeo.gdal package.
@Sean Gillies: sure, I made the wrong assumption. Nonetheless, you can't help to jump to conclusions when you see that info in the release on pypi, that you're 100% python coder and that GDAL is also the name of the python binding's package... Everything about GDAL shared library is running under the hood, so I don't even have to understand (very much) how it works. I'd say it would'nt be out of place to state all of this on pypi's homepage. I'll raise an issue about that on GitHub as well as elements disscussed with @Joris Van den Bossche.
It's not a great solution, I agree, and not only because you'll have two copies of libgdal. The Fiona project is not promoting it as a solution at all. In, I've warned users against this and I should probably do the same for Fiona to make it more clear. Would that help?
@Sean Gillies: Yes, definitively. You see, thanks to the amazing work on geopandas, I don't even use Fiona - except under the hood to manipulate files with geopandas. It's not easy to track all those limitations when it involves sub-dependencies. For instance, I knew of the warning on rasterio (though the warning may have been completed since I last read it and I certainly didn't make the connection with my present case); what I haven't figured yet is if it's safe to use geopandas and rasterio at the same time (which would the obvious thing to do if you wan't to use something like rasterstats, if there wasn't this incompatibility warning). So far, I haven't found inconsistencies on mixing those, but maybe there is. If that is, maybe a warning should also be set on geopandas (if not, I'd also said it would be adequate just to be explicite). If you have the answer to that question, I'd be gratefull to have it (in that case, I understand it could be safe to have the double installation of gdal, if I ever manage to configure a running virtualenv with both...)

Well in any case, thanks for those valuable insights!

Join to automatically receive all group messages.