Cannot import GeoIP module in Django

前端 未结 1 1972
Happy的楠姐
Happy的楠姐 2021-01-02 16:25

I\'m using Django 1.5.5.

settings.py:

GEOIP_PATH = os.path.join(PROJECT_DIR,  \'geoIP\')
INSTALLED_APPS = (..,\'django.contrib.gis\',..)
相关标签:
1条回答
  • 2021-01-02 16:59

    It looks like you don't have GeoIP installed system-wide. django.contrib.gis.geoip is just a wrapper around the GeoIP library, and it must be installed regardless.

    On OS X, if you use homebrew, just run brew install geoip. If not, you need to make sure the GeoIP lib is installed, and that you have libGeoIP.dylib located wherever your system keeps its libraries.

    0 讨论(0)
提交回复
热议问题