1 diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
2 index 05b5732..91fafee 100644
3 --- a/django/contrib/gis/gdal/libgdal.py
4 +++ b/django/contrib/gis/gdal/libgdal.py
6 from django.conf import settings
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 2cdb5d3..fac2d04 100644
16 --- a/django/contrib/gis/geos/libgeos.py
17 +++ b/django/contrib/gis/geos/libgeos.py
18 @@ -24,7 +24,7 @@ def load_geos():
19 from django.conf import settings
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.