1 diff --git a/django/contrib/gis/gdal/libgdal.py b/django/contrib/gis/gdal/libgdal.py
2 --- a/django/contrib/gis/gdal/libgdal.py
3 +++ b/django/contrib/gis/gdal/libgdal.py
5 lib_path = settings.GDAL_LIBRARY_PATH
6 except (AttributeError, EnvironmentError,
7 ImportError, ImproperlyConfigured):
9 + lib_path = "@gdal@/lib/libgdal@extension@"
13 diff --git a/django/contrib/gis/geos/libgeos.py b/django/contrib/gis/geos/libgeos.py
14 --- a/django/contrib/gis/geos/libgeos.py
15 +++ b/django/contrib/gis/geos/libgeos.py
16 @@ -26,7 +26,7 @@ try:
17 lib_path = settings.GEOS_LIBRARY_PATH
18 except (AttributeError, EnvironmentError,
19 ImportError, ImproperlyConfigured):
21 + lib_path = "@geos@/lib/libgeos_c@extension@"
23 # Setting the appropriate names for the GEOS-C library.