【问题标题】:GDAL configuration for Django in mac GDAL_LIBRARY_PATH exceptionmac GDAL_LIBRARY_PATH 异常中 Django 的 GDAL 配置
【发布时间】:2021-09-30 07:30:21
【问题描述】:

我尝试通过djangobrew install django的命令在macos中安装GDAL,它安装成功,我也使用pip install GDAL命令,它也安装成功。

但是,当我尝试运行 django 服务器时,它会抛出错误,设置 GDAL 库的路径。

django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal3.2.0", "gdal3.1.0", "gdal3.0.0", "gdal2.4.0", "gdal2.3.0", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.

【问题讨论】:

    标签: python django postgresql geospatial gdal


    【解决方案1】:

    我检查了“gdal”和“goes”库版本,

    酿造信息 gdal 酿造信息地理

    然后,我把这两行放到我的setting.py中

    GDAL_LIBRARY_PATH = "/opt/homebrew/Cellar/gdal/3.3.2_3/lib/libgdal.dylib" GEOS_LIBRARY_PATH = "/opt/homebrew/Cellar/geos/3.9.1/lib/libgeos_c.dylib"

    它对我有用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-04
      • 2014-11-12
      • 2022-12-07
      • 2021-10-04
      • 2019-12-02
      • 1970-01-01
      • 2011-01-25
      • 2018-07-18
      相关资源
      最近更新 更多