Mac Could not find the GDAL library 问题解决-2. 问题描述

时间:2024-01-24 19:04:59

苹果系统 Mac 中搭建 GeoDjango 开发环境时出现以下报错:

  File "*.venv/lib/python3.8/site-packages/django/contrib/gis/gdal/libgdal.py", line 60, in <module>
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal3.4.0", "gdal3.3.0", "gdal3.2.0", "gdal3.1.0", "gdal3.0.0", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.