Installing GeoIP on Mac?

Posted by Richard on Super User See other posts from Super User or by Richard
Published on 2011-06-28T15:41:09Z Indexed on 2011/06/28 16:24 UTC
Read the original article Hit count: 561

Filed under:
|
|

I want to install the MaxMind GeoIP C library, so that I can use GeoIP as part of Django. I'm working on MacOS.

I've downloaded GeoIP-1.4.8.tar.gz from here and run:

./configure
make
make check
make install

without any problems. I've also downloaded GeoIP.dat.gz and GeoLiteCity.dat.gz, unzipped them and put them in a local directory.

Then I've set the following paths in my settings.py:

GEOIP_PATH = 'path_to_dat_files'
GEOIP_LIBRARY_PATH = 'path_to_c_files'

Now I'm trying to run python manage.py migrate (which has a reference to GeoIP in a project I'm using), but I'm still getting this error:

from django.contrib.gis.utils import GeoIP
ImportError: cannot import name GeoIP

Any ideas? Thanks.

© Super User or respective owner

Related posts about python

Related posts about django