-
Notifications
You must be signed in to change notification settings - Fork 808
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
drop GDAL dependency #916
Comments
Looks like this is targeted for release in rasterio 1.4.0 around August 2023. |
Simple question, once direct dependency to GDAL will be dropped, will it be possible to install osmnx back with pip only or is there still other dependencies that cannot be handled by pure Python installation ? |
Hi @12rambau. The answer is nuanced, so let me provide some details. First, GDAL is an optional dependency, so even now it's not directly required by OSMnx itself unless you need to work with raster elevation data. But... Second, OSMnx depends on GeoPandas, which in turn depends on fiona, shapely, and pyproj. Those three packages in turn depend on the GEOS, GDAL, and PROJ libraries, all of which are written in C/C++. So, not pure Python. And that is where the installation can get tricky, depending on your system's configuration and the availability of pre-built binaries for it. Third, it's often possible to install OSMnx (and all of its dependencies) with pip... it's just not officially supported. There are too many variables with pip installation regarding platforms, system configuration, and binary availability for us to guarantee that it will work for everyone. This has nothing to do with OSMnx itself... it's just the dependencies of the dependencies that are not Python, so it's outside of our control. That said, I sometimes use pip to install OSMnx in Google Colab or in a test environment on one of my machines, and it works. It won't necessarily work for everyone, so we don't officially support it. If it works for you, great! If not, Conda installation is fully tested and supported. To summarize: Even if OSMnx no longer directly depends on GDAL itself, its dependencies still will, and your package manager will need to be able to install C/C++ libraries. Conda handles this seamlessly, whereas pip may or may not depending on the specifics of your system. That's why Conda is the standard installer across the Python geospatial science ecosystem. |
Thanks for the detailed answer, I know that That's very good also to know that your main fear is I think my usage of |
The upstream rasterio work for this issue has been deferred to v1.5.0 and currently does not appear to be in active development anymore: rasterio/rasterio#2699 (comment) |
OSMnx currently depends on GDAL directly in the
elevation
module to build VRTs, because rasterio doesn't expose equivalent functionality directly. However, it's not a good idea to import both rasterio and GDAL into the same working environment (see rasterio/rasterio#2573 (comment)).Rasterio devs are currently proposing new functionality that would allow us to build VRTs directly with rasterio. If so, we could drop the GDAL dependency. See this issue and this PR.
The text was updated successfully, but these errors were encountered: