【问题标题】:from django.contrib.gis.geos import GEOSException, GEOSGeometry, fromstr ImportError: cannot import name GEOSExceptionfrom django.contrib.gis.geos import GEOSException, GEOSGeometry, fromstr ImportError: cannot import name GEOSException
【发布时间】:2014-10-08 21:51:28
【问题描述】:

我正在开发 django-oscar 项目以创建自定义电子商务应用程序。

当我使用python manage.py runserver 命令运行我的项目时, 我收到此错误“

from django.contrib.gis.geos import GEOSException, GEOSGeometry, fromstr
    ImportError: cannot import name GEOSException"

如何安装 GEOS?

【问题讨论】:

    标签: python django django-oscar


    【解决方案1】:

    要使用 django 的地理空间功能,您需要额外安装相关库:

    https://docs.djangoproject.com/en/dev/ref/contrib/gis/install/

    【讨论】:

      猜你喜欢
      • 2019-07-20
      • 2020-07-16
      • 2019-06-10
      • 2014-09-25
      • 2014-01-02
      • 1970-01-01
      • 1970-01-01
      • 2018-11-13
      • 2022-08-22
      相关资源
      最近更新 更多