1 diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
2 index 30cba0f..5afc031 100644
3 --- a/django/contrib/gis/gdal/libgdal.py
4 +++ b/django/contrib/gis/gdal/libgdal.py
7 lib_path = settings.GDAL_LIBRARY_PATH
8 except (AttributeError, ImportError, ImproperlyConfigured, OSError):
10 + lib_path = "@gdal@/lib/libgdal@extension@"
14 diff --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py
15 index 1121b4f..f14ea2f 100644
16 --- a/django/contrib/gis/geos/libgeos.py
17 +++ b/django/contrib/gis/geos/libgeos.py
18 @@ -25,7 +25,7 @@ def load_geos():
20 lib_path = settings.GEOS_LIBRARY_PATH
21 except (AttributeError, ImportError, ImproperlyConfigured, OSError):
23 + lib_path = "@geos@/lib/libgeos_c@extension@"
25 # Setting the appropriate names for the GEOS-C library.