GeoDjango GEOSException error

后端 未结 8 871
Happy的楠姐
Happy的楠姐 2020-12-12 14:06

Trying to install a GeoDjango on my machine. I\'m really new to Python and being brought into a project that has been a very tricky install for the other team members. I ins

8条回答
  •  [愿得一人]
    2020-12-12 14:47

    I fixed the issue by installing PostGIS with Postgres using https://postgresapp.com/downloads.html.

    1. Install PostGIS (2.2): brew install postgis
    2. To unlink geos if version is higher than 3.6.1: brew unlink geos
    3. Install Geos (3.6.1): brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/145b22e8330e094ee148861e72e26c03e73d34a1/Formula/geos.rb
    4. Switch geos version(latest version is 3.7.2 which is not supported by Django 1.11.3): brew switch geos 3.6.1
    5. Login to database and create postgis extensions: CREATE EXTENSION postgis; Test postgis extension: SELECT ST_Distance('LINESTRING(-122.33 47.606, 0.0 51.5)'::geography, 'POINT(-21.96 64.15)'::geography);
    6. Check postgis version: SELECT PostGIS_full_version();

提交回复
热议问题